<html><head><title>roadster.smpl</title></head><body bgcolor="#FFFFFF">
<pre>
<B>do</B> roadster_pic;


<FONT COLOR = "#ff0000"><B>include</B></FONT> 'engine.smpl';


<B>object</B> tire <B>is</B>
	cylinder <B>with</B> end1 = 0 -3 0; end2 = 0 3 0; radius = 15; <B>end</B>;
	cylinder <B>with</B> end1 = 0 -3 0; end2 = 0 3 0; radius = 10; <B>end</B>;
	ring <B>with</B> center = 0 3 0; normal = 0 1 0;
		inner_radius = 10; outer_radius = 15; <B>end</B>;
	ring <B>with</B> center = 0 -3 0; normal = 0 1 0;
		inner_radius = 10; outer_radius = 15; <B>end</B>;
<B>end</B>;	<I>{tire}</I>


<B>object</B> wheel <B>is</B>
	flat grey tire; 
	flat white ring <B>with</B> 
		center = 0 2 0; normal = 0 1 0;
		inner_radius = 8; outer_radius = 10;
	<B>end</B>;	<I>{whitewalls}</I>
	flat white cone <B>with</B> end1 = 0 2 0; end2 = 0 4 0;
		radius1 = 8; radius2 = 0;
	<B>end</B>; 
	sphere <B>with</B> center = 0 2 0; radius = 3; <B>end</B>;
<B>end</B>;	<I>{wheel}</I>	


<B>object</B> axel <B>is</B>
	flat white cylinder <B>with</B> 
		end1 = 0 25 0; end2 = 0 -25 0; radius = 2;
	<B>end</B>; 
	wheel <B>with</B> move to 0 25 0; <B>end</B>;
	wheel <B>with</B> rotate by 180 around 0 0 1; move to 0 -25 0; <B>end</B>;
<B>end</B>;	<I>{axel}</I>


<B>object</B> fender <B>is</B>
	<I>{footstep}</I>
	polygon [(-20 -5 0) (20 -5 0) (20 5 0) (-20 5 0)];
	
	<I>{front fender}</I>
	polygon [(-65 -5 20) (-20 -5 0) (-20 5 0) (-65 5 20)];
	polygon [(-75 -5 20) (-65 -5 20) (-65 5 20) (-75 5 20)];
	polygon [(-75 -5 20) (-85 -5 10) (-85 5 10) (-75 5 20)];

	<I>{rear fender}</I>
	polygon [(40 -5 20) (20 -5 0) (20 5 0) (40 5 20)];
	polygon [(40 -5 20) (50 -5 20) (50 5 20) (40 5 20)];
	polygon [(50 -5 20) (60 -5 10) (60 5 10) (50 5 20)];
<B>end</B>;	<I>{fender}</I>


<B>object</B> hood <B>is</B>
	polygon [(0 -10 10) (50 -10 10) (50 0 0) (0 0 0)];
	polygon [(0 -10 10) (50 -10 10) (50 -20 10) (0 -20 10)];
	polygon [(0 -20 10) (50 -20 10) (50 -30 0) (0 -30 0)];
<B>end</B>;	<I>{hood}</I>


<B>object</B> body <B>is</B>
	<I>{front}</I>
	polygon [(-70 15 0) (-70 15 20) (-70 5 30)
			 (-70 -5 30) (-70 -15 20) (-70 -15 0)];
	
	<I>{dashboard}</I>
	polygon [(-20 15 0) (-20 15 20) (-20 5 30)
			 (-20 -5 30) (-20 -15 20) (-20 -15 0)];
	
	<I>{sides}</I>
	polygon [(-70 -15 0) (-20 -15 0) 
			 (-20 -15 20) (-70 -15 20)];
	polygon [(-70 15 0) (-20 15 0)
			 (-20 15 20) (-70 15 20)];

	<I>{triangular piece in front of seat}</I>
	polygon [(0 -20 0) (-20 -15 20) (-20 -15 0)];
	polygon [(0 20 0) (-20 15 20) (-20 15 0)];

	<I>{sides in back}</I>
	polygon [(0 -20 0) (60 -20 0) (60 -20 10) (0 -20 10)];
	polygon [(0 20 0) (60 20 0) (60 20 10) (0 20 10)];
	
	<I>{vertical piece under seats}</I>
	polygon [(0 -20 0) (0 -20 10) (0 20 10) (0 20 0)];
	
	<I>{floor under seats}</I>
	polygon [(0 -20 10) (60 -20 10) (60 20 10) (0 20 10)];
<B>end</B>;	<I>{body}</I>


<B>object</B> seat_back <B>is</B>
	sphere <B>with</B> center = 0 -5 20; radius = 3; <B>end</B>;
	sphere <B>with</B> center = 0 5 20; radius = 3; <B>end</B>;
	cylinder <B>with</B> end1 = 0 0 0; end2 = 0 0 20; radius = 3; <B>end</B>;
	cylinder <B>with</B> end1 = 0 -5 0; end2 = 0 -5 20; radius = 3; <B>end</B>;
	cylinder <B>with</B> end1 = 0 5 0; end2 = 0 5 20; radius = 3; <B>end</B>;
	cylinder <B>with</B> end1 = 0 5 20; end2 = 0 -5 20; radius = 3; <B>end</B>;
<B>end</B>;	<I>{seat_back}</I>


<B>object</B> seat <B>is</B>
	seat_back <B>with</B> 
		rotate by 15 around 0 1 0;	<I>{tilt seat back}</I>
		move to  8 0 0;
	<B>end</B>;
	cylinder <B>with</B> end1 = 8 5 0; end2 = 8 -5 0; radius = 3; <B>end</B>;
	sphere <B>with</B> center = -8 5 0; radius = 3; <B>end</B>;
	sphere <B>with</B> center = -8 -5 0; radius = 3; <B>end</B>;
	sphere <B>with</B> center = 8 5 0; radius = 3; <B>end</B>;
	sphere <B>with</B> center = 8 -5 0; radius = 3; <B>end</B>;
	cylinder <B>with</B> end1 = -8 0 0; end2 = 8 0 0; radius = 3; <B>end</B>;
	cylinder <B>with</B> 
		end1 = -8 5 0; end2 = -8 -5 0; radius = 3;
	<B>end</B>;	<I>{front of seat}</I>
	cylinder <B>with</B> 
		end1 = -8 5 0; end2 = 8 5 0; radius = 3;
	<B>end</B>;	<I>{side of seat}</I>
	cylinder <B>with</B> 
		end1 = -8 -5 0; end2 = 8 -5 0; radius = 3;
	<B>end</B>;	<I>{side of seat}</I>
<B>end</B>;	<I>{seat}</I>


<B>object</B> gas_tank <B>is</B>
	cylinder <B>with</B> end1 = 0 -16 0; end2 = 0 16 0; radius = 10; <B>end</B>;
	paraboloid <B>with</B> top = 0 -19 0; base = 0 -16 0; radius = 10; <B>end</B>;
	paraboloid <B>with</B> top = 0 19 0; base = 0 16 0; radius = 10; <B>end</B>;
<B>end</B>;	<I>{gas_tank}</I>
	
	
<B>object</B> trunk <B>is</B>
	block <B>with</B>
		vertex = 0 -15 0;
		side1 = 30 0 0;
		side2 = 0 30 0;
		side3 = 0 0 30;
	<B>end</B>;
<B>end</B>;	<I>{trunk}</I>


<B>object</B> hitch <B>is</B>
	cylinder <B>with</B> end1 = 0 0 0; end2 = 0 0 6; radius = 1; <B>end</B>;
	sphere <B>with</B> center = 0 0 6; radius = 2; <B>end</B>;
<B>end</B>;	<I>{hitch}</I>	


<B>object</B> steering_wheel <B>is</B>
	metallic white cylinder <B>with</B> 
		end1 = 0 0 10; end2 = 0 0 20; radius = 1;
	<B>end</B>;
	metallic white cylinder <B>with</B>
		end1 = -8 0 20; end2 = 8 0 20; radius = .8;
	<B>end</B>; 
	metallic white cylinder <B>with</B>
		end1 = 0 -8 20; end2 = 0 8 20; radius = .8;
	<B>end</B>; 
	flat grey cylinder <B>with</B>
		end1 = 0 0 19.5; end2 = 0 0 20.5; radius = 8;
	<B>end</B>; 
	flat grey ring <B>with</B>
		center = 0 0 20.5; normal = 0 0 1;
		inner_radius = 7; outer_radius = 8;
	<B>end</B>; 
	disk <B>with</B> center = 0 0 20.5; normal = 0 0 1; radius = 2; <B>end</B>;
<B>end</B>;	<I>{steering_wheel}</I>


<I>{
<B>object</B> engine <B>is</B>
	cylinder <B>with</B> end1 = -10 -5 0; end2 = -10 -5 25; radius = 5; <B>end</B>;
	disk <B>with</B> center = -10 -5 25; normal = 0 0 1; radius = 5; <B>end</B>;
	cylinder <B>with</B> end1 = -10 5 0; end2 = -10 5 25; radius = 5; <B>end</B>;
	disk <B>with</B> center = -10 5 25; normal = 0 0 1; radius = 5; <B>end</B>;
	cylinder <B>with</B> end1 = 0 -5 0; end2 = 0 -5 25; radius = 5; <B>end</B>;
	disk <B>with</B> center = 0 -5 25; normal = 0 0 1; radius = 5; <B>end</B>;
	cylinder <B>with</B> end1 = 0 5 0; end2 = 0 5 25; radius = 5; <B>end</B>;
	disk <B>with</B> center = 0 5 25; normal = 0 0 1; radius = 5; <B>end</B>;	
	cylinder <B>with</B> end1 = 10 -5 0; end2 = 10 -5 25; radius = 5; <B>end</B>;
	disk <B>with</B> center = 10 -5 25; normal = 0 0 1; radius = 5; <B>end</B>;
	cylinder <B>with</B> end1 = 10 5 0; end2 = 10 5 25; radius = 5; <B>end</B>;
	disk <B>with</B> center = 10 5 25; normal = 0 0 1; radius = 5; <B>end</B>;	
<B>end</B>;	<I>{engine}</I>
}</I>

	
<B>object</B> headlight <B>is</B>
	paraboloid <B>with</B> top = 10 0 0; base = 0 0 0; radius = 5; <B>end</B>;
	unshaded white sphere <B>with</B> center = 3 0 0; radius = 2; <B>end</B>;
<B>end</B>;	<I>{headlight}</I>


<B>object</B> chassis
<B>is</B>
	fender <B>with</B> move to 0 -25 15; <B>end</B>;
	fender <B>with</B> move to 0 25 15; <B>end</B>;
	
	body <B>with</B> move to 0 0 15; <B>end</B>;

	<I>{crankshaft}</I>
	flat white cylinder <B>with</B> end1 = -20 0 15; end2 = 45 0 15; radius = 1; <B>end</B>;

	steering_wheel <B>with</B> 
		rotate by 80 around 0 1 0; 
		move to -30 10 35; 
	<B>end</B>;
	metallic white cylinder <B>with</B> 
		end1 = 45 0 35; end2 = 60 0 35; radius = 2;
	<B>end</B>;	<I>{spare wheel holder}</I>
	wheel <B>with</B> 
		rotate by -90 around 0 0 1;
		move to 60 0 35; 
	<B>end</B>;	<I>{spare wheel}</I>

	flat brown seat <B>with</B> move to 10 -10 28; <B>end</B>; 
	flat brown seat <B>with</B> move to 10 10 28; <B>end</B>;
	flat grey trunk <B>with</B> move to 25 0 15; <B>end</B>; 
	metallic white gas_tank <B>with</B> move to 35 0 45; <B>end</B>;
	metallic white hitch <B>with</B> move to 68 0 15; <B>end</B>;

	<I>{floor}</I>
	flat charcoal polygon [(70 0 15) (60 20 15) (-70 20 15)
			 (-80 0 15) (-70 -20 15) (60 -20 15)];

	metallic white headlight <B>with</B> move to -70 -25 40; <B>end</B>;
	metallic white headlight <B>with</B> move to -70 25 40; <B>end</B>;
<B>end</B>;	<I>{chassis}</I>	


<B>object</B> roadster <B>with</B>
	<FONT COLOR = "#0000ff"><B>scalar</B></FONT> t = 0;
	<FONT COLOR = "#0000ff"><B>scalar</B></FONT> hood_angle = 0;
<B>is</B>
	engine <B>with</B> 
		time = t / 15;
		magnify by 8;
		rotate by 180 around 0 0 1;
		move to -50 0 15; 
	<B>end</B>; 
	axel <B>with</B> rotate by t * 10 around 0 -1 0; move to -70 0 15; <B>end</B>;
	axel <B>with</B> rotate by t * 10 around 0 -1 0; move to 45 0 15; <B>end</B>;

	hood <B>with</B> 
		render_mode = wireframe;
		rotate by -hood_angle around 1 0 0;
		move to -70 15 35;
	<B>end</B>;

	chassis <B>with</B>
		render_mode = wireframe;
	<B>end</B>;
<B>end</B>;	<I>{roadster}</I>


<B>picture</B> roadster_pic <B>with</B>
	<FONT COLOR = "#0000ff"><B>scalar</B></FONT> t = 0;
	eye = 100 -150 100; 
	lookat = 0 0 16;
	render_mode = shaded;

	<I>{
	facets = 4;
	render_mode = hidden_line;
	}</I>
	<I>{
	eye = 100 -150 16; 
	projection = orthographic;
	field_of_view = 400;
	}</I>
<B>is</B>
	distant_light <B>with</B> direction = .3 -.5 1; <B>end</B>;
	glossy red roadster <B>with</B> t = t; <B>end</B>;
<B>end</B>;	<I>{roadster_pic}</I>


<B>anim</B> roadster_anim <B>with</B>
	field_of_view = 80;
	render_mode = shaded;
	facets = 0;
	width = 16;
	height = 8;
<B>is</B>
	<FONT COLOR = "#0000ff"><B>integer</B></FONT> frames = 0;
	<B>while</B> <B>true</B> <B>do</B>
		roadster_pic <B>with</B> 
			t = frames; 
			double_buffer = on;
		<B>end</B>;
		rotate by 1 around 0 0 1;
		frames = frames + 1;
	<B>end</B>;	
<B>end</B>;	<I>{roadster_anim}</I>


</pre>
</body></html>
