POV-Ray : Newsgroups : povray.newusers : Simple isosurface : Re: Simple isosurface Server Time
26 Apr 2024 21:18:42 EDT (-0400)
  Re: Simple isosurface  
From: Alain
Date: 8 Mar 2016 13:38:42
Message: <56df1c32$1@news.povray.org>
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

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