|
|
Le 16-03-07 10:28, kurtz le pirate a écrit :
>
> Hi,
>
>
> For a cylinder along the x axis, the equation is :
> function { y*y + z*z - R }
>
> Ok, but how to make an isosurface cylinder like povray cylinder from two
> points?
>
>
> I thought to :
> - compute distance from p2 to p1.
> - compute the two angles from p1 to p2
> - make x axis isosurface cylinder
> - rotate the isosurface of the two angles
> - translate to p1
>
> Do you see a simpler solution ?
>
>
>
>
> ---
> kurtz le pirate
> compagnie de la banquise
There is no easy way to directly make an arbitrary oriented cylinder
between two random points.
Use vlength() to find the distance between the two points.
Create the cylinder from <0,0,0> to vlength along an axis of your choice.
Rotate the cylinder as needed using the reorient() macro.
Translate to P1
Post a reply to this message
|
|