---
title: 'Workflow: Desmos -> Processing -> Fiji -> 3D Print'
url: 'https://blog.recursiveprocess.com/2016/07/08/workflow-desmos-processing-fiji-3d-print'
markdown: 'https://blog.recursiveprocess.com/2016/07/08/workflow-desmos-processing-fiji-3d-print.md'
date: '2016-07-08'
description: "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 th…"
taxonomy:
  category:
    - blog
---

# Workflow: Desmos -> Processing -> Fiji -> 3D Print

### [Workflow: Desmos -> Processing -> Fiji -> 3D Print](https://blog.recursiveprocess.com/2016/07/08/workflow-desmos-processing-fiji-3d-print)

   July 8, 2016, 12:00 am  

*Note: this post is a more advanced version of the [previous post](https://blog.recursiveprocess.com/2016/06/13/workflow-daily-desmos-desmos-madeup-3d-print/) 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](http://desmos.com/) sketch to a [processing](http://processing.org/) sketch to [Fiji](http://imagej.net/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](http://alem3d.obidos.org/en/)) that shows how we can view a cube (a 3D object) as a 2D slice.

![cuicse](https://blog.recursiveprocess.com/wp-content/uploads/2016/07/cuicse.gif)

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](https://www.desmos.com/calculator/nw1ndbmbme) that shows the cup being sliced from the bottom to the top:

![gifsmos](https://blog.recursiveprocess.com/wp-content/uploads/2016/07/gifsmos.gif)

(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 ](http://www.openprocessing.org/sketch/376686)(had to be modified for openprocessing because PShape isn’t supported in JS), and [here’s the original code](http://pastebin.com/bm69daE4). Once again, much more detail is available in the video.

![ezgif.com-video-to-gif](https://blog.recursiveprocess.com/wp-content/uploads/2016/07/ezgif.com-video-to-gif.gif)

## Fiji

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

![Screen Shot 2016-07-07 at 2.06.36 PM](https://blog.recursiveprocess.com/wp-content/uploads/2016/07/Screen-Shot-2016-07-07-at-2.06.36-PM-1024x1008.png)

## 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.

![Screen Shot 2016-07-07 at 2.09.28 PM](https://blog.recursiveprocess.com/wp-content/uploads/2016/07/Screen-Shot-2016-07-07-at-2.09.28-PM-1024x734.png)

and two hours later:

![IMG_4668](https://blog.recursiveprocess.com/wp-content/uploads/2016/07/IMG_4668-1024x1024.jpg)

## 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.

![IMG_4670](https://blog.recursiveprocess.com/wp-content/uploads/2016/07/IMG_4670-1024x1024.jpg) ![IMG_4669](https://blog.recursiveprocess.com/wp-content/uploads/2016/07/IMG_4669-1024x1024.jpg)

## Spiral Ball

These were teased in a [couple](https://twitter.com/dandersod/status/748626947618504704) of [tweets](https://twitter.com/dandersod/status/748627546779041797), 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](https://t.co/btLQoaZuWp)
> 
> — Dan Anderson (@dandersod) [June 30, 2016](https://twitter.com/dandersod/status/748626947618504704?ref_src=twsrc%5Etfw)

> Likewise: <https://t.co/dy4UdzTKzd> [pic.twitter.com/j3TocBT3iF](https://t.co/j3TocBT3iF)
> 
> — Dan Anderson (@dandersod) [June 30, 2016](https://twitter.com/dandersod/status/748627546779041797?ref_src=twsrc%5Etfw)

![IMG_4671](https://blog.recursiveprocess.com/wp-content/uploads/2016/07/IMG_4671-1024x1024.jpg) ![IMG_4673](https://blog.recursiveprocess.com/wp-content/uploads/2016/07/IMG_4673-1024x1024.jpg) ![IMG_4677](https://blog.recursiveprocess.com/wp-content/uploads/2016/07/IMG_4677-1024x1024.jpg)

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](https://www.desmos.com/calculator/elrgtqotjp) for this (admittedly weird model).

![gifsmos (1)](https://blog.recursiveprocess.com/wp-content/uploads/2016/07/gifsmos-1.gif)

![Screen Shot 2016-07-07 at 2.36.49 PM](https://blog.recursiveprocess.com/wp-content/uploads/2016/07/Screen-Shot-2016-07-07-at-2.36.49-PM.png)

## Dragon Fractal

These were directly coded in processing, [here’s the originating code to make the fractal](http://openprocessing.org/sketch/202442).

![IMG_4678](https://blog.recursiveprocess.com/wp-content/uploads/2016/07/IMG_4678-1024x1024.jpg) ![IMG_4679](https://blog.recursiveprocess.com/wp-content/uploads/2016/07/IMG_4679-1024x1024.jpg)

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!

 [ Next Post](https://blog.recursiveprocess.com/2016/09/08/if-you-had-a-friend-taking-this-class-next-year-what-advice-would-you-give-them) [Previous Post ](https://blog.recursiveprocess.com/2016/06/13/workflow-daily-desmos-desmos-madeup-3d-print)

#### SimpleSearch

Bootstrap Theme for [Grav](http://getgrav.org)

---

## Navigation

- Parent: [A Recursive Process](https://blog.recursiveprocess.com/index.md)
- Previous: [If you had a friend taking this class next year, what advice would you give them?](https://blog.recursiveprocess.com/2016/09/08/if-you-had-a-friend-taking-this-class-next-year-what-advice-would-you-give-them.md)
- Next: [Workflow: Daily Desmos -> Desmos -> Madeup -> 3D Print](https://blog.recursiveprocess.com/2016/06/13/workflow-daily-desmos-desmos-madeup-3d-print.md)
