POV-Ray : Newsgroups : povray.general : drawing arrows Server Time
7 Nov 2024 11:33:35 EST (-0500)
  drawing arrows (Message 1 to 5 of 5)  
From: Tanju Gurel
Subject: drawing arrows
Date: 14 Mar 2002 16:47:30
Message: <3c911a72@news.povray.org>
hi..
i'm new in povray....
i want to draw 3d arrows..
do i have to connect cylinders and cones?
or is there another way?

thanks
tanju.


Post a reply to this message

From: Shay
Subject: Re: drawing arrows
Date: 14 Mar 2002 16:54:27
Message: <3c911c13@news.povray.org>
Tanju Gurel <tan### [at] ibuedutr> wrote in message
news:3c911a72@news.povray.org...
> i want to draw 3d arrows..
> do i have to connect cylinders and cones?
> or is there another way?

There are a hundred ways. If you tell what you don't like about cylinders
and arrows, then we can help you find a more desirable alternative.

 -Shay


Post a reply to this message

From: Tanju Gurel
Subject: Re: drawing arrows
Date: 14 Mar 2002 16:59:47
Message: <3c911d53@news.povray.org>
thanks
i have spheres (atoms)
and i want to show the direction of the vibrations of
these atoms by arrows...
i only want to give the start and end coordinates of arrow
and want to draw an arrow
tanju



"Shay" <sah### [at] simcopartscom> wrote in message
news:3c911c13@news.povray.org...
> Tanju Gurel <tan### [at] ibuedutr> wrote in message
> news:3c911a72@news.povray.org...
> > i want to draw 3d arrows..
> > do i have to connect cylinders and cones?
> > or is there another way?
>
> There are a hundred ways. If you tell what you don't like about cylinders
> and arrows, then we can help you find a more desirable alternative.
>
>  -Shay
>
>
>
>


Post a reply to this message

From: Shay
Subject: Re: drawing arrows
Date: 14 Mar 2002 17:21:48
Message: <3c91227c@news.povray.org>
/* 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

From: Tanju Gurel
Subject: Re: drawing arrows
Date: 14 Mar 2002 17:33:15
Message: <3c91252b@news.povray.org>
that's exactly what i want.....!!
thanks a lot...
have a nice day......
tanju


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.