POV-Ray : Newsgroups : povray.text.scene-files : zenospace : Re: zenospace Server Time
28 Jun 2024 22:54:55 EDT (-0400)
  Re: zenospace  
From: Dennis Miller
Date: 27 Jan 2003 11:06:44
Message: <3e355914$1@news.povray.org>
Thanks for the links. How would you translate the function:
y = cos(n*x*acos(x))

into  POV syntax?

Thanks much,
Dennis
"gimi" <gim### [at] psicoch> wrote in message news:3E3### [at] psicoch...
> hi,
>
> i stumbled across this old scene files last week
> where i tried to implement an idea that Clifford
> Pickover mentions in one of his marvelous books
> ("Mazes for the Mind: Computers and the unexpected",
> Clifford A. Pickover, St. Martin's Press, New York).
>
> in chapter 45, "Squashed Worlds That Pack Infinity
> into a Cube", p.249), he describes a simple method
> to do exactly this.
>
> i was interested how various objects would look like
> in zenospace, and so i wrote this little scene.
> - feel free to improve or extend it!
>
> please note that there are two versions of the
> sphere function. - i guess that the second one
> is just a little faster. i did not verify this,
> though.
>
> BTW, there is more in cliff's books that also
> inspired me, he even did some raytracing himself.
> you'll find amazing pictures there! - to find out
> more, please see
>    http://www.pickover.com/
>    (his homepage)
> and
>    http://RealityCarnival.Com
>    (his newest homepage ;)
> and
>    http://sprott.physics.wisc.edu/pickover/neoreality.html
>    (a page about his neoreality novels)
> if you want to find out more about his work.
>
> ..and click on the links below to visit my own site,
> where you will find even more about raytracing,
> programming and other things i do!
>
>
> gimi
>
>
> - ok, and here is the source:
>
> <source>
> // zeno.pov
> // by gim### [at] psicoch - http://www.psico.ch
>
> #default {
>      texture {
>          pigment {
>              color rgbt < .5, .5, .5, 0 >
>          }
>          finish {
>              ambient   .9    diffuse      .1
>              phong    0.4    phong_size 200
>              specular  .4    roughness   .2
>          }
>      }
> }
>
>
> //  infinite plane in a box
> // arguments:
> //  a,b,c : plane (xyz) parameters,
> //  r     : plane distance,
> //          as in "ax + by + cz = r"
> #declare f_zeno_plane  = function(a,b,c, r, x,y,z) {
>        a * atanh(x)
>      + b * atanh(y)
>      + c * atanh(z)
>      + r
> }
>
>
> //  finite sphere in a box - first version
> // arguments:
> //  a,b,c : sphere center point
> //  r     : sphere radius
> #declare f_zeno_sphere1 = function(a,b,c, r, x,y,z) {
>     sqrt(
>         pow(atanh(x)-a, 2)
>       + pow(atanh(y)-b, 2)
>       + pow(atanh(z)-c, 2)
>     ) - r
> }
>
>
> //  finite sphere in a box - second version
> // arguments:
> //  a,b,c : sphere center point
> //  r     : sphere radius
> #declare f_zeno_sphere2 = function(a,b,c, r, x,y,z) {
>     (
>         pow(atanh(x)-a, 2)
>       + pow(atanh(y)-b, 2)
>       + pow(atanh(z)-c, 2)
>     ) - pow(r,          2)
> }
>
>
> isosurface {
>
>      function {
>          f_zeno_plane(
>              4, 16, -8,  +2,
>              x,y,z
>          )
>      }
>
>      // cut off "noise"
>      contained_by { box { -.999999, +.999999 } }
>      threshold 0
>      accuracy .01
>      evaluate 1, 1.1, 0.90
>      translate -2.1*x
> }
>
>
> isosurface {
>
>      function {
>          f_zeno_sphere1(
>              0.8, -0.5, -1,  1.5,
>              x,y,z
>          )
>      }
>
>      // cut off "noise"
>      contained_by { box { -.999999, +.999999 } }
>      threshold 0
>      accuracy .01
>      evaluate 10, 1.1, 0.90
> }
>
>
> isosurface {
>
>      function {
>          f_zeno_sphere2(
>              0.8, -0.5, +1,  1.5,
>              x,y,z
>          )
>      }
>
>      // cut off "noise"
>      contained_by { box { -.999999, +.999999 } }
>      threshold 0
>      accuracy .01
>      evaluate 10, 1.1, 0.90
>      translate +2.1*x
> }
>
>
> sky_sphere {
>      pigment {
>          gradient y  ramp_wave
>          color_map {
>              [ 0.000/6   color rgbft <1,1,0, 0,0> ]
>              [ 1.000/6   color rgbft <0,1,0, 0,1> ]
>              [ 1.001/6   color rgbft <0,1,0, 0,1> ]
>              [ 2.000/6   color rgbft <0,1,1, 0,0> ]
>              [ 3.000/6   color rgbft <0,0,1, 0,1> ]
>              [ 3.001/6   color rgbft <0,0,1, 0,1> ]
>              [ 4.000/6   color rgbft <1,0,1, 0,0> ]
>              [ 5.000/6   color rgbft <1,0,0, 0,1> ]
>              [ 5.001/6   color rgbft <1,0,0, 0,1> ]
>              [ 6.000/6   color rgbft <1,1,0, 0,0> ]
>          }
>      }
> }
>
>
> camera {
>      location <0,4,-8>
>      look_at 0
>      angle 45
> }
>
>
> light_source {
>      <0,10,0>
>      color rgb 1
> }
> </source>
>
> --
> mailto:gim### [at] psicoch
> http://www.psico.ch/
> http://psico.servehttp.com/
>


Post a reply to this message

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