Wednesday, October 30, 2019

Ambiguous Objects

Michael Tritle
10/20/19
MATH 401 – 3D Printing

Assignment 3: Ambiguous Curves

There’s common saying: “A magician never reveals his secret.” For me personally, this is understandable since most reveals have an element of deception to them. For mathematicians, it’s important that all secrets are revealed, so that we achieve consistency and mutual understanding. In figures 1 and 2, we see two different shapes at the top.













These images are actually of the same object. The noticeable difference comes from the viewing orientation. The shapes we see are generated by portions of these curves:

Figure 1:




Figure 2:




The first set of curves generate a pair of semi-circles, and the second set of curves generate two parabolas.

If we were to view this object from no specific position, the surface of the object looks like this:



This is generated by the space parameterizations



Where 

For more details on how to mathematically derive these equations, please visit here.

Creating a 3D printable object can be successfully done using software like Mathematica.

The following code creates a graphical representation of the 3D object seen in figures 1 and 2. 

ParametricPlot3D[
 20 { {t, alpha ((-Sqrt[1 - (-Abs[t] + 1)^2] + 1) + (-t^2 + 1)), 
     u*(r + alpha ((-t^2 + 1) - (-Sqrt[1 - (-Abs[t] + 1)^2] + 
             1)))}, {t, 
     alpha ((Sqrt[1 - (-Abs[t] + 1)^2] - 1) + (t^2 - 1)), 
     u*(r + alpha ((t^2 - 1) - (Sqrt[1 - (-Abs[t] + 1)^2] - 1)))}} /. 
  r -> 2, {u, 0, 1}, {t, -1, 1}, PlotStyle -> Thickness[2], 
 Mesh -> False, PlotPoints -> 100, AspectRatio -> Equal, 
 ViewPoint -> {0, Infinity, Infinity}]


A major difference here is that were are adding points below the curve. We are achieving this by adding an extra parameter  in our earlier parameterization. The result looks like this:

.




Concave Lillypad

Jean-Marc Daviau-Williams
MTH401
Riemann Surfaces

For the print this week, we made Reimann surface by running different equations of z=r*e^(i*theta) through Mathematica and generating a 3d object.  Mine was the result of taking (z^3 - 1)^(1/3), which resulted in an object that looks like a lillypad in the shape of a bowl.


First, broke down the problem into five pieces.  The x-direction and y-direction converted to polar coordinates, the equation for z in polar, the equation for my object in terms of z, the real part of that equation, and the imaginary part, as broken down by Stephen Fischer [1, p.1-3].  This made it easy to manipulate the objects and see what would look nice, using the Extrude argument to add thickness.

Next, I had to select what parts of the output of the z equation I would use.  I could use the real part, the imaginary part, or both with one superimposed on another.  The imaginary part looked appealing, however seemed much too difficult to print, as the origin has a sharp edges that meet.  Next, I looked at the real part, which looked much easier to print.  I tried seeing how it would look with both on one image, however it did not look appealing, so I just exported the real part.


Finally was the process of printing the actual object.  My object was printed using the makerbot and had no issues.  This is primarily due to my selection of the real part over the imaginary part, as the object had no sharp edges.  No glue or additional supports were needed to print, besides the default markerbot raft.  Overall, it was a very smooth experience.

This assignment was a nice demonstration of complex variables and their mappings.  While I haven't had much experience in it, this did help me visualize the two outputs of a function of complex numbers.  It was also a good exercise in separating out variables in a Mathematica notedbook, which is something that will be valuable in future assignments, such as the data modeling print.

1) Fisher, S. D. (1999). Complex variables. New York: Dover.

Riemann Surface

The Auger (Riemann Surface)
By: Colston DiBlasi
Math 401 Mathematics Through 3D Printing
George Mason University
10/29/19

This I call the Auger. This is a Riemann Surface. The reason why I call this the auger is because its round shape reminds me of a lawn auger on the lawn. This print uses complex variables and complex functions. 

The definition for a Riemann surface is a surface-like configuration that covers the complex plane with several, and in general infinitely many, "sheets." These sheets can have very complicated structures and interconnections. Riemann surfaces are one way of representing multiple-valued functions; another is branch cuts. 

The function that I used was z^(1/4). This is what the code looked like.



When writing the code to print some struggles that I encountered the majority of my problems. The main problem that I encountered was when trying to figure out how to get the thickness increases. This was a problem because it seemed like when I increase it .1 it would drastically change the thickness to where you couldn’t see the individual surfaces. Another problem was trying to get my print time down. When I printed it vertically it was over 8 hours long. I figured out that if I turned the entire thing and printed it on its side that it cut the print time down to around 2.5 hours. I did print it on a raft on the makers bot. It was a little rough when the print came out but all in all it turned out well. This is what my final print looked like.



 A good site to look at different Riemann Surface graphs is https://en.wikipedia.org/wiki/Riemann_surface.

Tuesday, October 29, 2019

Multivariable prints on display


Visualizing Multivariable Calculus
These 3D printed objects are designed and printed by students in Math 401, Fall 2019, taught by Instructor Dr. Evelyn Sander with the assistance of Chloe Ham and Colin Chung.

Saddles, discontinuous functions, gradient descent, Lagrange multipliers
Learning multivariable calculus involves a lot of algebraic manipulations, but it all becomes much
easier when getting to see what the concepts look like in 3D.

Monday, October 28, 2019








MATH 401: Math Through 3D Printing
Taylor Fountain
Fall 2019, Section 001

1 Period of w = arcsin(z)
Functions, surfaces, and transformations are 3 of several mathematical ideas that are introduced strictly on the field of real numbers: a real number undergoes an operation, outputting some amount of other real numbers, that are often represented on a graph with 2 or 3 real axes. But, when generalizing these concepts to the set of complex numbers, graphing becomes significantly harder: to map these functions from the complex plane onto the complex plane, 4 dimensions are required, while our feeble human minds can only visualize in 3. In the 19th century, Bernhard Riemann introduced a workaround for this: complex valued functions can be shown with two 3-dimensional plots: 1 from the complex plane to the real axis that represents the real component of the function, and 1 from the complex plane to the imaginary axis that represents it’s imaginary component, producing two Riemann surfaces.

The main difficulty in graphing these surfaces is taking the complex valued function and separating it into the real and complex components. For the inverse sine function ( w=sin-1(z) ), the separation process starts with inverting the function ( sin(w) = z ) and rewriting the sine function as in it’s exponential form, resulting in

by rearranging the equation into the form of a polynomial where u = eiw and using the quadratic equation, we can rewrite this equation as

Note that the +/- is kept in only when using the multi-valued inverse sine function. When using the single-valued inverse sine function, only the positive branch is shown. Then, using the complex logarithm identity,

Solving for w and simplifying, we get

To find the real component of this, we again use the complex logarithm identity to rewrite the function as

And, because, when z is strictly real, Arg[z] = 0 and the magnitude is equal to the function itself, we can reduce the equation to
Next came the process of plotting the function, where I used the ParametricPlot3D function in Mathematica, using the polar definitions of x and y with Euler’s formula to get it in a form that Mathematica can render. The resulting graph will only show one period of oscillation; however, due to the multivalued nature of theta in the complex plane, the functions can be stacked to form a complete (and consequently infinite) representation.
 
To simplify printing, the plot was broken into 2 components, which were identical due to the functions symmetry. Two copies of the piece were rotated onto their side to reduce print time, and were printed with rafts and supports in 1hr 30min on the Makerbot; no problems arose. The pieces were then glued to form the real Riemann surface of w = sin-1(z).

Object - 2 were printed and glued to form Riemann surface

Sunday, October 27, 2019

Ambiguous objects on display


Ambiguous Objects 
These 3D printed objects are designed and printed by students in Math 401, Fall 2019, taught by Instructor Dr. Evelyn Sander with the assistance of Chloe Ham and Colin Chung.
Sugihara Cylinders

Take a look at each object and its reflection. They are not the same! This optical illusion created using mathematics. 

Wednesday, October 23, 2019

A Visualization of Gradient Descent

MATH 401: Math Through 3D Printing Fall 2019
Savannah Crawford


Gradient descent is a popular optimization method for finding the  minimum of a function. The algorithm is simple and easy to implement in various languages, but can take a long time to run depending on stopping conditions, initial conditions and local minimums.

The algorithm uses the power of the gradient of a given function. Since the gradient gives the direction of greatest increase at a point, the gradient descent takes a given point a0, and calculates . Then

 where delta is fixed step size. The algorithm then runs until the difference between an and an+1 is sufficiently small.

Python code implementation of gradient descent


In particular this print finds the local minimum of


 with a0 = (2,7) and delta = .01. The local minimum was found to be  at (4.12, 4.55).


Graph of F(x,y) generated in Mathematica



The gradient decent was run in Python and the points were exported as a text file. The data was imported into Mathematica to plot a tube around the list of points generated in Python, with the addition of the z-component as F(xn,yn). The supports for the print were generated in openSCAD. I was unable to export the gradient descent points and the surface together, so they were exported as separate .stl files and combined with supports in MeshLab.

Final 3D model meshed in MeshLab



Overall, I'm very happy with the way this print came out and I learned a few new things about file I/O in Mathematica. It demonstrates very nicely the power of the gradient and gradient descent algorithm.

Wednesday, October 16, 2019

Octopus Saddle

by: Khalilah Hamer

This week, the Math 401: Mathematics Through 3D Printing class created 3D figures inspired by multivariable calculus concepts. Inspired by the hyperbolic paraboloid or saddle and the dubbed “monkey saddle” I decided to recreate an “octopus saddle” containing 8 maxima and 8 minima. 
I used the application Mathematica in creating this saddle and the equation f_8 (x,y) = (x^8 - 28 x^6 y^2 + 70 x^4 y^4 - 28 x^2 y^6 + y^8)/7.

I derived this equation from  z(r, θ) = r^n e^(i n θ) = r ^n [cos(n θ) + i sin(n θ) =

 With the knowledge of i^2 being -1, I kept k at even numbers to derive the equation.  Having the final equation = f_8 (x,y) = (x^8 - 28 x^6 y^2 + 70 x^4 y^4 - 28 x^2 y^6 + y^8). The final equation is divided by 7 which will be discussed when I examine the problems I’ve had when creating the print. 

Going about coding the project. I examined the example codes and saw that it was much easier and made more sense to define everything at the beginning of the code so when I go back through the code to troubleshoot if any problems occur, I can read the words like "range" and "tubess" then I will know what to change or edit as opposed to a bunch of numbers and equations trying to figure out what will help shrink the image. Then I worked on the the tubes first. The code is below.
 Below is a comparison of the original equation vs when I divided the equation by 7, as you can see the print turned out to be really tall and if I did try to change the range a bit, the minima would be cut off.





Overall the coding was simple and the print looked good. I decided not to add the “feet” to the bottom of the graph since it seemed with eight legs to be quite stable already. The only problem I encountered was that the sides of the print was very tall. I didn't want to necessarily scale the graph and from the way the code was, editing the plotRange did not actually affect the range when the code was opened on the ultimaker. The way I solved this problem was dividing the equation to flatten the graph. The end result was a divide by 7 which did flatten the graph quite a bit but it wasn’t nearly as tall and the print didn't take over a day. Below is a figure of my final print.




Wednesday, October 9, 2019

Ambiguous Object

Joseph Kerns
M401
Assignment 3

Ambiguous Object
            Everyone has looked at an optical illusion before and thought, “how does that work?” With the advent of 3D printers, the world of optical illusions has opened up to including complex mathematical models. Using additive technology, we can construct sophisticated mathematical models and visualize them in virtual spaces, but then we can print them out and hold them in our hands. 

Kokichi Sugihara has written papers formulating how to construct 3-dimensional objects that appear differently than their reflection in a mirror. For our assignment, I relied heavily on his formulas to execute my design. Below you will see examples of Sugihara’s ambiguous objects, and then the designs that I made.







I decided to design a hexagon inscribed in a unit circle. In order to construct the figure, I utilized Wolfram Mathematica. The Piecewise[] function was an integral part of my construction, due to the nature of a hexagon. After the figure had been created, the next goal was to subtract the two functions from each other, and divide by 2. The goal is to “indent” one function on the other, so that as the viewing angle changes, the figure changes shape.

Dual Overlapping Cylinders

Jean-Marc Daviau-Williams

For the print this week, we made ambiguous objects where when viewed from a 45 degree angle is seen as one shape, but when viewed from the opposite direction is seen as another.  My object was a dual, overlapping cylinder where they look like diamond cylinders with one side over the other and elliptical/circular cylinders from the opposite direction with the other side over.  The process of making this print was a learning experience, but came out well.

First, I had to greater familiarize myself with Mathematica, understanding how the function for creating the 3d model interacts with the mathematical functions put through it.  I started with the function ParametricPlot3D[], with the boilerplate code provided with the assignment.  Next, I copied the arguments, shifted them by plus or minus 1, and pasted them as additional arguments in the same function.  This created the initial plan of the two shapes, ensuring the optical illusion could be achieved.  



Next, I had to use the same ParametricPlot3D[] function to create the full 3d model to print.  This added an additional layer of complexity, as the code required many more nested, curly-bracket arguments.  After some playing around with the values, I was able to get my cylinders positioned one over the other and overlapping in the x direction.  Overall, this took the most effort in the whole process.



Finally was the process of printing the actual object.  During my print slot, the only printer available was the makerbot as the ultimaker and lulzbot were experiencing technical difficulties, which is common for cutting-edge technology.  With the .stl file I exported from Mathematica, it was sliced on the makerlab computer and took x hours to print.




This assignment was an important learning experience.  Many 3d objects that are hard to visualize are only possible to create through the use of mathematical functions in cartesian, polar, or spherical coordinates in software like Mathematica.  This will be even more apparent in the next assignment, where I am to print a visual representation of the discontinuity of a surface, differentiable in the x and y directions but non-differentiable itself.