Building extruded shapes
horn.wrl

	

#VRML V2.0 utf8
#
#  Horn
#  horn.wrl
#        by David R. Nadeau
#        published in "The VRML 2.0 Sourcebook" by Ames, Nadeau, and Moreland
#
#  Illustrate the use of an Extrusion to build a Dr. Seuss-like horn.
#

WorldInfo {
	title "Horn"
	info [ "Copyright (c) 1997, Andrea L. Ames, David R. Nadeau, John L. Moreland" ]
}

Viewpoint {
	position 0.0 1.5 11.0
	description "Entry view"
}

NavigationInfo {
	type [ "EXAMINE", "ANY" ]
	headlight TRUE
}

Shape {
	appearance Appearance {
		material Material {
			diffuseColor 0.9 0.7 0.0
		}
	}
	geometry Extrusion {
		beginCap FALSE
		endCap FALSE
		creaseAngle 1.57
		solid FALSE
		crossSection [
		# Circle
			 1.00  0.00,   0.92 -0.38,
			 0.71 -0.71,   0.38 -0.92,
			 0.00 -1.00,  -0.38 -0.92,
			-0.71 -0.71,  -0.92 -0.38,
			-1.00  0.00,  -0.92  0.38,
			-0.71  0.71,  -0.38  0.92,
			 0.00  1.00,   0.38  0.92,
			 0.71  0.71,   0.92  0.38,
			 1.00  0.00
		]
		spine [
		# Helix
			 2.00 0.00 -0.00,   1.85 0.12 -0.77,
			 1.41 0.24 -1.41,   0.77 0.36 -1.85,
			 0.00 0.48 -2.00,  -0.77 0.61 -1.85,
			-1.41 0.73 -1.41,  -1.85 0.85 -0.77,
			-2.00 0.97  0.00,  -1.85 1.09  0.77,
			-1.41 1.21  1.41,  -0.77 1.33  1.85,
			 0.00 1.45  2.00,   0.77 1.58  1.85,
			 1.41 1.70  1.41,   1.85 1.82  0.77,
			 2.00 1.94  0.00,   1.85 2.06 -0.77,
			 1.41 2.18 -1.41,   0.77 2.30 -1.85,
			 0.00 2.42 -2.00,  -0.77 2.55 -1.85,
			-1.41 2.67 -1.41,  -1.85 2.79 -0.77,
			-2.00 2.91  0.00,  -1.85 3.03  0.77,
			-1.41 3.15  1.41,  -0.77 3.27  1.85,
			 0.00 3.39  2.00,   0.77 3.52  1.85,
			 1.41 3.64  1.41,   1.85 3.76  0.77,
			 2.00 3.88  0.00,
		]
		scale [
			1.200 1.200,  0.778 0.778,  0.756 0.756,  0.734 0.734,
			0.712 0.712,  0.690 0.690,  0.668 0.668,  0.646 0.646,
			0.625 0.625,  0.603 0.603,  0.581 0.581,  0.559 0.559,
			0.537 0.537,  0.515 0.515,  0.493 0.493,  0.471 0.471,
			0.450 0.450,  0.428 0.428,  0.406 0.406,  0.384 0.384,
			0.362 0.362,  0.340 0.340,  0.318 0.318,  0.296 0.296,
			0.275 0.275,  0.253 0.253,  0.231 0.231,  0.209 0.209,
			0.187 0.187,  0.165 0.165,  0.143 0.143,  0.121 0.121,
			0.100 0.100,
		]
	}
}