*Note: this post is a more advanced version of the previous post and uses slightly different software. All this software is free and open-source.*

In this post I’m going to outline how to use a workflow to go from a desmos sketch to a processing sketch to Fiji to a 3D file. The basic idea of the workflow is based on the idea of looking at a 3D object as a 2D image which is changed through time. Here’s a gif (source) that shows how we can view a cube (a 3D object) as a 2D slice.

So if we can create the 2D sketch, then we can create the 3D object with Fiji. Here’s a video that contains a walkthrough of all the steps involved in this process in more detail.

## Desmos Sketch

I used Desmos as a tool for quickly prototyping the 2D sketch. The original idea was to make a wavy cup. So the cup would start with a circle base, and slowly change up the walls to have a wavy top. Here’s the desmos sketch that shows the cup being sliced from the bottom to the top:

(There is more detail on how this sketch was created in the video.)

## Processing Sketch

Next, we can bring the sketch to Processing so that we can easily save a bunch of frames and have a lot of control over all the details. Here’s the live code (had to be modified for openprocessing because PShape isn’t supported in JS), and here’s the original code. Once again, much more detail is available in the video.

## Fiji

Next bring the 400 frames into Fiji. Fiji is often used for stitching 2D images from MRI machines into 3D objects.

## MeshLab

This is an optional step for shrinking the number of triangles used, and hence shrinking the model size.

## 3D Print

Shown with Makerbot, but every 3D printer has software that can do these steps.

and two hours later:

## More Wavy Cups

These both use a different period for the sine function, and the second adds in a sine inside the first sine based on the height to give it the “wiggle” back and forth.

## Spiral Ball

These were teased in a couple of tweets, the concept is the same as the wavy cup, but the size of each slice is controlled by a circle function. The desmos sketches are linked in the tweets.

If this represents slices of an object over time then what does the 3D object look like? https://t.co/PPjUGzvWj3 pic.twitter.com/btLQoaZuWp

— Dan Anderson (@dandersod) June 30, 2016

Likewise: https://t.co/dy4UdzTKzd pic.twitter.com/j3TocBT3iF

— Dan Anderson (@dandersod) June 30, 2016

The black spiral ball uses consecutive fibonacci periods spinning in different directions, which is why it looks like a pine cone.

## Fresnel Lens Sphere

Here’s the desmos sketch for this (admittedly weird model).

## Dragon Fractal

These were directly coded in processing, here’s the originating code to make the fractal.

Let me know if you know of a different way of making this kind of 3d model! It works pretty well, but there are some rough edges with taking the 2D images to make the 3D model. Cheers!