POV-Ray : Newsgroups : povray.advanced-users : Isosurfaces... of revolutions ? : Re: Isosurfaces... of revolutions ? Server Time
28 Jul 2024 22:16:42 EDT (-0400)
  Re: Isosurfaces... of revolutions ?  
From: JC (Exether)
Date: 24 Oct 2003 03:19:26
Message: <3f98d27e@news.povray.org>
This is not exactly what you're asking for but there is also a way to 
wrap a planar isosurface around in a cylinder :

my_zy_plane_function (f_diameter(x,y,z)*sqrt(x*x+z*z)-R, y, 
R*acos(x/sqrt(x*x+z*z))))

The my_zy_plane_function should be a function describing some planar 
shape like  function(x,y,z) { (x + 0.5)*(1.3+x) }  for example and 
f_diameter is an optional function to vary the diameter along the cylinder.

When using such a regular function as the one I give in example it 
doesn't have much interest, but you can use much more complex shapes as 
f_mesh1 for example.

#declare F_Rotin=function(x,y,z) { f_mesh1 (x,2*y,z,1,0.2,1,0.1,2)};

#macro Cylindre_Rotin(R,H)
isosurface {
   function { F_Rotin (x, sqrt(y*y+z*z)-R, R*acos(y/sqrt(y*y+z*z))) }
   contained_by { box { <0,-R*1.1,-R*1.1>, <H,R*1.1,R*1.1> } }
   threshold 0.08
   accuracy 0.001
   max_gradient 6
   //  evaluate -1, 0.8, 1.0
   rotate 90*z
}
#end

You can write
function { F_Rotin (x, sqrt(y*y+z*z)-R, R*acos(y/max(epsilon, 
sqrt(y*y+z*z)))) }
to avoid divisions by zero if you're a purist, but in practice it's not 
necessary.

JC

_Light_Beam_ wrote:
> How to use any "2D" curve (like lathes) to revolve it and combining with any
> other function ?
> I want to make an Isosurface "Vase" wih some reals (3D, no bumps) reliefs on
> it...
> ...
> I suppose I'll must use : #declare my_curve = spline {n, <>, <>, <>...} no ?
> but how to revolves it along Y axis and apply my others isosurface functions
> on it ?
> Am I clear enough ?
> Thanks
> 
>


Post a reply to this message

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