Jump to content

Lorenz Attractor


anakin78z

Recommended Posts

  • 2 weeks later...
  • 1 month later...

I set up an ifd to render these puppies. Looks like this:

ray_version VEX6.1.269

# Define some geometry named "geo".  It is smooth shaded.  It contains a single primitive sphere.
# ray_detail -s geo ./sphere.bgeo
ray_detail -s geo stdin
PGEOMETRY V5
NPoints 1 NPrims 1
NPointGroups 0 NPrimGroups 0
NPointAttrib 0 NVertexAttrib 0 NPrimAttrib 0 NAttrib 0
0 0 0 1
Sphere 0 0.2 0 0 0 -8.742278e-09 -0.2 0 0.2 -8.742278e-09
beginExtra
endExtra




#Define the camera and output image
ray_picture ip          # Set the output image name
ray_resolution 512 512  # Set the output resolution
ray_zoom 1              # Set the field of view
ray_clip .01 10000      # Set near/far clipping planes

# Now, instance the geometry 5 times.  We can use the standard
# hscript expression evaluation and variable expansion to position
# the objects.



# Light definitions
# Light /obj/light1
ray_light -n /obj/light1 -Z 1.20711 1.20711
ray_shader opdef:/Shop/v_asadlight lightcolor 0.8 0.8 0.8 doatten 1 atten 1e+06
ray_transform 0.946524 -0.319927 -0.0416889 0 0.283868 0.764407 0.578879 0 0.153332 0.559757 -0.814347 0 18.1857 80.3025 -38.1168 1
ray_smask *


set h = 0.005
set a = 10
set b = 28
set c = `8/3`

set x = 0.1
set y = 0
set z = 0
set poke = 0

# set number of spheres to render
for i = 0 to 1000
 ray_object object$i geo   # Define an instance  
 # Transform the instance, with lorenz attractor code
  set X = `$x + $h * $a * ($y - $x)`
  set Y = `$y +$h * ($x * ($b - $z) - $y)`
  set Z = `$z + $h * ($x * $y - $c * $z )`
  set x = $X
  set y = $Y
  set z = $Z
  ray_transform 1 0 0 0  0 1 0 0  0 0 1 0  `$x-1.5` `$y+1` `$z+3` 1     
  if ( `$i%100`==0)
  echo $i
  endif
  # Apply a surface shader to the instance
  ray_shader opdef:/Shop/v_plastic amb 1 1 1 diff `fit($i,0,1000,0,1)` `abs(sin($i/20))` 0 spec 1 1 1 rough 0.1 _shop_ /shop/v_plastic1
ray_lmask  0
ray_rmask *
end

# Tell mantra to render the scene
echo "Render Starting NOW"
ray_raytrace # Quit mantra
ray_quit

]

And renders like this (with a hundred thousand spheres)

post-13-1079487899.jpg

Link to comment
Share on other sites

  • 1 year later...
  • 1 year later...

Interesting solution!

Being a big fan of Lorenz Attractors myself, I tried to build this too.

It took me sometime to build an animatable version with 3dsmax and was thinking in Houdini this must be an ease.

I stumbled over recursive problems but never thought of using particles.

Is there a way to build recursive stuff with this "vop sop"?

Georg

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...