|
|
/* You can cut and paste this into Povray */
#macro Arrow (START, END) /* defines the start of a macro */
/* change these to suit your scale and taste
these will be the common measurements of every arrow */
#local Arrow_Head_Length = .8;
#local Arrow_Head_Radius = .3; // large radius of cone
#local Arrow_Shaft_Radius = .15;
/* end change these to suit your scale and taste */
#local Arrow_Vector = END - START; /* defines the direction in which the
arrow is pointing */
#local Shaft_Meets_Head = END - vnormalize (Arrow_Vector) *
Arrow_Head_Length;
/* vnormalize takes the direction of the arrow and makes its length
equal to 1
multiplying this by the length of the arrowhead and subtracting
it from the end
leaves room for the arrowhead */
cylinder {START, Shaft_Meets_Head, Arrow_Shaft_Radius} /* this is the shaft
*/
cone {Shaft_Meets_Head, Arrow_Head_Radius, END, 0} /* this is the head */
#end // #macro Arrow (START, END) /* this is the end of the macro */
union {Arrow (<-1,0,0>, <1,0,0>) pigment {rgb 1}}
/* call the macro inside a union statement so you can add your
textures and transformations */
/* hope this helps -Shay */
Post a reply to this message
|
|