Skip to content

grnnja/level-surfaces

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Level Surfaces: an OpenSCAD based 3D surface grapher

Level surfaces utilizes the rendering capabilities of the 3D modeling language OpenSCAD to graph any implicit surface as well as level surfaces over time.

Demo

frame00001 hypberbolalq

Making Animations

  1. Add $t to f(x, y, z)

    • $t varies from 0 to 1 over the course of the animation
    • Example:
      • The constant in this function changes from -10 to 10
      • function f(x, y, z) = pow(x, 2) + pow(y, 2) - pow(z, 2) - 10 + 20 * $t;
    • More information about animation in OpenSCAD link
  2. Move the camera where you want to be in the animation or use the built in variables to set the camera location

  3. Select dump pictures

  4. Set fps to 1 at the bottom of the screen

  5. Set steps to the number frames you want

  6. Wait to complete rendering

    • OpenSCAD will output a series of images into the same folder as level-surfaces.scad
    • This can take minutes or hours depending on the computer and render quality
  7. To turn the images into a gif or video

    • Use an online png to gif converter
    • Or use ffmpeg with a command similar to: ffmpeg -framerate 60 -i frame%05d.png video-name.gif

FAQ

How does it work?

The rendering system uses a Marching Cubes algorithm to take points from the function and translate them to a 3D model. This works by extracting data points from the function and then creating a polygonal mesh field based on the cube's intersections.

About rendering algorithms.

Several algorithms for tracing 3D objects exist. These methods (sphere tracing, marching cubes, level set, dual contouring, etc) extract points to express density or orientation of points.

Releases

No releases published

Packages

No packages published