Beschreibungen und Beispiele zum Raytracer POV-Ray von Friedrich A. Lohmüller

            Geometrische Körper in POV-Ray

English English English
Italiano Italiano
Français français

Home
- POV-Ray Tutorial
 
Geometrische Körper
   Inhaltsübersicht
Grundformen
Körper mit Makros + CSG
Körper in "shapes3.inc"
Andere Körper als Makros
3D-Text-Objekte
Andere Formen
Non CSG Körper
height_field + HF macros

Isosurfaces
  ->with Basic Surfaces
  - with Sine Functions
  - by Built-in Functions
  - by Helix Functions
  - by Pattern Functions
                                   
       isosurface{ ... } - mit Grundfunktionen. Beispiele:
          Built-in shape
isosurface
isosurface{ //-------------------------
  function { y }
  threshold 0
  contained_by{box{<-1,-1,-1>,<1,1,1>}}
  // max_gradient 3
  // accuracy 0.0001
  // open
  texture{
    pigment{ color rgb<1,1,1>}
    finish { phong 1}
  } // end of texture
  scale <1,1,1>*1.0
  rotate <0,0,0>
  translate <0,0,0>
} // end of isosurface ----------------
isosurface
isosurface{ //-------------------------
  function { x }
  threshold 0
  contained_by{box{<-1,-1,-1>,<1,1,1>}}

  texture{
    pigment{ color rgb<0.65,1,0>}
    finish { phong 1}
  } // end of texture
  scale <1,1,1>*1.0
  rotate <0,0,0>
  translate <0,0,0>
} // end of isosurface ----------------
isosurface
isosurface{ //-------------------------
  function{ abs(x) - 2 + y }

  contained_by { box { -2, 2 } }
  accuracy 0.003
  max_gradient 5

  texture{
    pigment{ rgbt<1,0.9,0.2, 0.3>*1.2}
    finish { phong 0.1}
  } // end of texture
  scale <1, 1, 1>*1.0
  rotate <0, 0, 0>
  translate <0, 0, 0>
} // end of isosurface ----------------
isosurface
isosurface{ //-------------------------
  function{  abs(x)+abs(y)+abs(z)-2 }

  contained_by { box { -2, 2 } }
  accuracy 0.003
  max_gradient 5

  texture{
    pigment{ color rgb<1,0.75,0.45>*1.2}
    normal { bumps 0.75 scale 0.05}
    finish { phong 1}
  } // end of texture
  scale <1, 1, 1>*0.5
  rotate <0, 0, 0>
  translate <0, 0, 0>
} // end of isosurface ----------------
isosurface
isosurface{ //-------------------------
  function{ abs(x)+abs(y)+abs(z)-2.9  }
  contained_by { box { -2, 2 } }
  accuracy 0.003
  max_gradient 5

  texture{ pigment{ color rgb<1,0.15,0.05>}
           normal { bumps 0.5 scale 0.035}
           finish { specular 0.2
                    phong 1 reflection 0.15}
         } // end of texture
  scale <1,1,1>*0.5
  rotate <0,0,0>
  translate <0,0,0>
} // end of isosurface ----------------
isosurface
isosurface{ //-------------------------
  function{ sqrt(x*x + y*y + z*z) - 1 }
  threshold 0
  contained_by{box{<-1,-1,-1>,<1,1,1>}}

  texture { pigment{ color rgb<1,0.1,0.2>}
            normal { bumps 1.5 scale 0.0135}
            finish {  specular 0.3 phong 0.3}
  } // end of texture
  scale 1
  rotate <0,0,0>
  translate <0,0,0>
} // end of isosurface ----------------
isosurface
isosurface{ //-------------------------
  function{  sqrt(x*x + z*z) - abs(y)}
  threshold 0
  accuracy 0.0001
  max_gradient 5
  contained_by{ box{ -1, 1 } }

  texture { pigment{ color rgb<0.5,0.3,0.8>}
            normal { bumps 0.25 scale 0.0135}
            finish { phong 1}
  } // end of texture
  scale <1,1,1>*1
  rotate <0,0,0>
  translate <0,0,0>
} // end of isosurface ----------------
isosurface
isosurface{ //-------------------------
  function { x*x + z*z - y*y - 0.25 }
  threshold 0
  accuracy 0.0001
  max_gradient 5
  contained_by{box{<-2,-1,-2>,<2,1,2>}}

  texture{ pigment{ color rgb<1.0,0.3,0.5>}
           finish { phong 1 }
  } // end of texture
  scale <1,1,1>*1
  rotate <0,0,0>
  translate <0,0,0>
} // end of isosurface ----------------
isosurface
isosurface{ //-------------------------
  function {  sqrt(x*x + z*z) - 1 }

  threshold 0
  accuracy 0.0001
  max_gradient 5
  contained_by{box{ -1 , 1 }}

  texture{ pigment{ color rgb<0.3,0.7,0.9>}
           normal { bumps 0.5 scale 0.0135}
           finish { specular 0.3 phong 1 }
  } // end of texture
  scale <1,1,1>*1
  rotate <0,0,0>
  translate <0,0,0>
} // end of isosurface ----------------
isosurface
isosurface{ //-------------------------
  function { y - (x*x*10 + z*z)*0.1 }
  threshold 0
  accuracy 0.0001
  max_gradient 5
  contained_by{box{ -1 , 1 }}

  texture{ pigment{ color rgb<0.5,1,1>}
           normal { bumps 0.5 scale 0.0125}
           finish { phong 1 }
  } // end of texture
  scale <1,1,1>*1
  rotate <0,0,0>
  translate <0,0,0>
} // end of isosurface ----------------
isosurface
isosurface{ //-------------------------
  function { y - x*x + z*z  }

  threshold 0
  accuracy 0.0001
  max_gradient 5
  contained_by{box{<-1,-1,-1.5>,<1,1,1.5>}}

  texture{ pigment{ color rgb<0.5,1,0.7>}
            normal { bumps 0.5 scale 0.0125}
            finish {   phong 0.3}
  } // end of texture
  scale <1,1,1>*1
  rotate <0,0,0>
  translate <0,0,0>
} // end of isosurface ----------------
isosurface
#declare fn_A = function { sqrt(y*y + z*z)- 0.8}
#declare fn_B = function { abs(x)+abs(y)-1}
isosurface{ //-------------------------
  function {  min(fn_A(x,y,z), fn_B(x,y,z))}

  contained_by{ box{ -3.5, 3.5 }}
  accuracy 0.003
  max_gradient 5

  texture{ pigment{ color rgb<1,0.7,0.5>*0.45}
           normal { bumps 0.5 scale 0.0125}
           finish { phong 0.1}
  } // end of texture
  scale <1,1,1>*1
  rotate <0,0,0>
  translate <0,0,0>
} // end of isosurface ----------------
isosurface
#declare fn_A = function { sqrt(y*y + z*z)- 0.8}
#declare fn_B = function { abs(x)+abs(y)-1}
#declare Blob_Threshold=0.125;
isosurface{ //-------------------------
  function {
      (1+Blob_Threshold)
      -pow(Blob_Threshold,fn_A(x,y,z))
      -pow(Blob_Threshold,fn_B(x,y,z))
  }
  max_gradient 4
  contained_by{ box{<-4,-2,-3>,<4,2,3>}}

  texture{ pigment{ color rgb<1,0.3,0.5>}
           finish { phong 1}
  } // end of texture
  scale <1,1,1>*0.5
  rotate <0,0,0>
  translate <0,0,0>
} // end of isosurface ----------------
isosurface
isosurface{ //-------------------------
  function {
   (1+0.002)
    - pow( 0.002, ( sqrt(x*x+y*y)-0.5))
    - pow( 0.008, ( abs(x*0.7)+abs(z*0.7)-0.5))
    - pow( 0.002,( sqrt( y*y+z*z )-0.5))
   //  - f_noise3d( x*3, y*3, z*3 )
  }
  contained_by{ box{<-2,-1.5,-1.5>,<2,1.5,1.5>}}
  accuracy 0.003
  max_gradient 5

  texture{ pigment{ color rgb<1,0.7,0.1>}
           finish { phong 1}
  } // end of texture
  scale <1,1,1>*1
  rotate <0,0,0>
  translate <0,0,0>
} // end of isosurface ----------------

© Friedrich A. Lohmüller, 2014
www.f-lohmueller.de