POV-Ray : Newsgroups : povray.binaries.images : Hand rail, smooth isosurface twist Server Time
30 Jul 2024 18:22:21 EDT (-0400)
  Hand rail, smooth isosurface twist (Message 1 to 2 of 2)  
From: StephenS
Subject: Hand rail, smooth isosurface twist
Date: 7 Feb 2011 22:45:01
Message: <web.4d50bb4db245c854d5ec6a70@news.povray.org>
A hand rail that will end in the background of a scene with stone work and the
front of a building.

The isosurface gives a smooth transistion from straight/twist/straight.
Also includes some CSG and a surface normal.

#local fn_A=function(x){abs(x)-1};
#local fn_B=function{abs(z)-.25};
#local fn_C=function{abs(y)-.25};
#local N=1;
#local fn_Smooth=function(x){x*x*x*(10+x*(6*x-15))};
#local fn_twistY=function{z*sin(fn_Smooth(x)*2*pi*N) +
y*cos(fn_Smooth(x)*2*pi*N)};
#local fn_twistZ=function{z*cos(fn_Smooth(x)*2*pi*N) -
y*sin(fn_Smooth(x)*2*pi*N)};
#local
fn_twist_Box=function{max(fn_A(x-1),fn_B(x,fn_twistY(x,y,z),fn_twistZ(x,y,z)),fn_C(x,fn_twistY(x,y,z),fn_twistZ(x,y,z))
)};
isosurface {
   function {
      fn_twist_Box(x-.5,y,z)
   }
   contained_by {box{<.5,-.5,-.5>,<1.5,.5,.5>}}
   threshold 0
   accuracy 0.001
   max_gradient 10.58
   max_trace 9

translate <-.5,0,0>
scale <10,1,1>
rotate <0,0,0>
}


Comments welcome:

Stephen S


Post a reply to this message


Attachments:
Download 'iso_smooth_twist_big.png' (232 KB)

Preview of image 'iso_smooth_twist_big.png'
iso_smooth_twist_big.png


 

From: Trevor G Quayle
Subject: Re: Hand rail, smooth isosurface twist
Date: 8 Feb 2011 01:20:04
Message: <web.4d50dfa4830bd89ab05ef170@news.povray.org>
"StephenS" <nomail@nomail> wrote:
> A hand rail that will end in the background of a scene with stone work and the
> front of a building.
>
> The isosurface gives a smooth transistion from straight/twist/straight.
> Also includes some CSG and a surface normal.
>

Good work, glad you figured it out.
I think the surface normals should probably be scaled down for the kind of
finish I would expect for this object.  (probably ~2-4X)



How is the render time for the isosurface?  For this kind of object, a
procedural mesh may be ideal, but requires a headache's worth of math and logic
coding :)

tgq


Post a reply to this message

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