POV3ISO examples


Internal functions



#include "isocom.inc"

#declare R0 = 3

isosurface {
function "sphere",<R0>
bounded_by{ box <-R0,-R0,-R0>,<R0,R0,R0>}
texture {ComYw}
translate <0, 2, 0>
}

isosurface {
function "rounded_box", <0.3>
bounded_by{ box <-5, -3, -5>, <5, -1, 5>}
texture {ComBl}
}

// **** try to compare with following shapes ****
//sphere {<0,2,0>, R0 texture {ComYw} }

//box {<-5, -3, -5>, <5, -1, 5> texture {ComBl}}
//superellipsoid { <0.1, 0.1> scale <5, 1, 5> translate <0, -2, 0> texture { ComBl } }

Function "sphere" is provided only for tests, function "rounded_box" would be quite useful since it's much faster than superellipsoid.



Here is another example of internal functions.

#include "isocom.inc"
isosurface {
function "mesh1", <1, 1, 1, 0.15, 1>
bounded_by{ box <-3, -0.35, -3>, <3, 0.35, 3>}
threshold 0.20
texture{ComYw}
scale 2
translate <0,-1,0>
}

isosurface {
function "mesh1", <1, 1, 1, 0.0, 1>
bounded_by{ box <-1., -0.1, -1.>, <1., 0.1, 1.> }
threshold 0.10
texture{ComBl}
scale 5
translate <0, 2, 0>
}



Note! Please use POV3ISO beta 8a or later version.
/* helix *
* p[0] : number of helix *
* p[1] : frequency *
* p[2] : minor radius *
* p[3] : major radius *
* p[4] : shape parameter *
* p[5] : cross section *
* p[5] = 1: circle *
* = 2: diamond *
* < 1: rectangle(rounded) *
* p[6] : rotation angle for p[5]<1 */

#include "isocom.inc"

isosurface {
function "helix1", <2, 4, 0.1, 1.5, 1, 1, 0>
bounded_by{ box <-1.7, -5, -1.7>, <1.7, 5, 1.7> }
scale 2.2 texture{ComYw} no_shadow }

isosurface {
function "helix2", <1, -3, 1.15, 0.15, 1, 1, 0>
bounded_by{ box <-1.3, -4, -1.3>, <1.3, 4, 1.3>}
scale 1.2 texture{ComGreen} translate <-7,-2,0> no_shadow }

isosurface {
function "helix1", <1, -1, 0.8, 1.5, 1.0, 0.5, 15>
bounded_by{ box <-2.5, -12, -2.5>, <2.5, 12, 2.5> }
eval
texture {ComBl} no_shadow }

isosurface {
function "helix1", <1, 3, 0.9, 1.7, 1.0, 0.2, 45>
bounded_by{ box <-3.0, -7, -3.0>, <3.0, 7, 3.0> }
eval
texture {ComRed} scale <0.5, 1, 0.5> translate <7,2,0> no_shadow }



Example of torus shapes.
This sample shows how to specify the functions and methods.

#include "colors.inc"

camera {
   location <15, 40, -35>
   direction <0, 0,  5.5>
   look_at <0,0,0>
}

light_source {<-50, 40, -20> color White}
light_source {<  0, 40, -50> color White}
background {color DarkSlateGray}

#declare R0=2.0
#declare R1=0.5
#declare L0=2.8
#declare BBOXL = < -(R0+R1), -R1, -(R0+R1)>
#declare BBOXH = <(R0+R1), R1, (R0+R1)>

#declare FUNC1= function{"torus", }
#declare FUNC2= function{sqrt(sqr(sqrt(sqr(x)+sqr(z))-R0)+sqr(y)) -R1 }

//----- All of following four objects give us same shape.  ------------

isosurface {
     function {FUNC1}   bounded_by{ box{BBOXL, BBOXH}}   method 1
     pigment {Green}
     translate <-L0, 0, L0>
}

isosurface {
     function {FUNC1}   bounded_by{ box{BBOXL, BBOXH}}   method 2
     pigment {Blue}
     translate < L0, 0, L0>
}

isosurface {
     function {FUNC2}   bounded_by{ box{BBOXL, BBOXH}}  method 1
     pigment {Red}
     translate <-L0, 0,-L0>
}

isosurface {
     function {FUNC2}  bounded_by{ box{BBOXL, BBOXH}}  method 2
     pigment {Yellow}
     translate < L0, 0,-L0>
}


External functions

This is a rope which consists of only two isosurface objects.

#include "colors.inc"
#include "textures.inc"

camera { location <24, 24, -45> direction <0, 0, 3.5> 
  look_at <-0,-4, 0> }

light_source {<150, 400, -120> color White}
light_source {<350, 200, -120> color White}

#declare LineObject = isosurface
{
    library "i_nfunc"
    function "func_6", <6, 4/6, 0.4, 0.7, 1.5,1,0>
    bounded_by{ box <-1.5, -0, -1.5>, <1.5, 8, 1.5>}
    max_gradient 3.5
}

#declare CurveObject= isosurface
{
    library "i_nfunc"
    function "func_12", <8.0, -24, 6, 0, 0.4, 0.7, 1/36, -6, 0.2,-64> 
    bounded_by{ box <-0, -2, -9.5>, <9.5, 2, 0> }
    max_gradient 4.5 
}

union{
  object { LineObject rotate z*90 translate <0,0,-8>}
  object { CurveObject }
  texture{Yellow_Pine}
}

background {color Gray30} 


POV3ISO page