POV-Ray : Newsgroups : povray.newusers : Simple isosurface : Re: Simple isosurface Server Time
25 Apr 2024 08:34:53 EDT (-0400)
  Re: Simple isosurface  
From: Le Forgeron
Date: 8 Mar 2016 08:00:11
Message: <56deccdb$1@news.povray.org>
Le 07/03/2016 16: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?
>

Is it an European or an African Swallow ?

Oh, wrong movie.

A plain cylinder or an open cylinder ?

>
> 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 ?
>

For a close cylinder, keep the function as it is and use the 
contained_by box to get the extremities. (something like
  box { <0, -1.1*R, -1.1*R> , < length(p2-p1), 1.1*R, 1.1*R> }

Assuming you took a box from x == 0 to x == length(p2-p1),
you can use Reorient_Trans(x , p2-p1) from transform.inc,
then translate to p1.
Done.

For an open cylinder, add the *open* keyword.


Post a reply to this message

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