





 
 




 
 


Hello,
I have a really stupid question.
I want to draw a line (a cylinder in fact), between two points in a
"gradual way". Let us take two points A and B separated by a distance
DIST and trying to do :
delta = 0
while (delta < DIST)
draw cylinder from A to A+delta
increment delta
end
And the 'last' cylinder is draw from A to B.
I'm lost between 'vnormalize', 'vtransform' and 'reorient' :(
Probably very easy, but I'm ditching.

Kurtz le pirate
Compagnie de la Banquise
Post a reply to this message


 
 




 
 


kurtz le pirate <kur### [at] gmailcom> wrote:
> Hello,
>
> I have a really stupid question.
>
> I want to draw a line (a cylinder in fact), between two points in a
> "gradual way". Let us take two points A and B separated by a distance
> DIST and trying to do :
>
> delta = 0
> while (delta < DIST)
> draw cylinder from A to A+delta
> increment delta
> end
>
> And the 'last' cylinder is draw from A to B.
>
>
> I'm lost between 'vnormalize', 'vtransform' and 'reorient' :(
> Probably very easy, but I'm ditching.
>
>
> 
> Kurtz le pirate
> Compagnie de la Banquise
You want something along the lines of:
1. calculate the distance D between the points.
2. normalize the vector P (P2  P1)
3. #for (M, 0, D, StepSize)
cylinder {0, P*M, LineWidth translate P1}
#end
Post a reply to this message


 
 




 
 


hi,
kurtz le pirate <kur### [at] gmailcom> wrote:
> Hello,
>
> I have a really stupid question.
>
> I want to draw a line (a cylinder in fact), between two points in a
> "gradual way". Let us take two points A and B separated by a distance
> DIST and trying to do :
>
> delta = 0
> while (delta < DIST)
> draw cylinder from A to A+delta
> increment delta
> end
>
> And the 'last' cylinder is draw from A to B.
>
> I'm lost between 'vnormalize', 'vtransform' and 'reorient' :(
> Probably very easy, but I'm ditching.
couldn't do it myself (haven't the math) but think that the distribution file
"scenes/animations/vect1/vect1.pov" contains the info you're after.
regards, jr.
Post a reply to this message


 
 




 
 


On 12/10/2019 23:15, kurtz le pirate wrote:
> Hello,
>
> I have a really stupid question.
>
> I want to draw a line (a cylinder in fact), between two points in a
> "gradual way". Let us take two points A and B separated by a distance
> DIST and trying to do :
>
> delta = 0
> while (delta < DIST)
> draw cylinder from A to A+delta
> increment delta
> end
>
> And the 'last' cylinder is draw from A to B.
>
>
> I'm lost between 'vnormalize', 'vtransform' and 'reorient' :(
> Probably very easy, but I'm ditching.
>
>
#declare A = <2,1,0.5>;
#declare B = < 3,3, 0.5>;
#declare C = B*clock + A*(1clock) + <0,0,0.00001>; // Or declare a
subclock
sphere{A,0.2 pigment{rgb<1,0,0>}}
sphere{B,0.2 pigment{rgb<0,0,1>}}
cylinder{A,C,0.1 pigment{rgb<0,1,0>}}
Post a reply to this message


 
 




 

