# chen

## 09 Feb 2015

Twittable summary: What I image my donut would be before opening my oven. Created by @chen.

I create a donut which is baked in a very weird way. I chose donuts to model because I was eating donuts when I started to think what to create. Donuts are easy to model but I still need a good idea to modify the shape of donuts.

In the beginning, I used Rhino + Python to randomly modify the control points of perfectly baked donuts according to the ScrewUpRate.

Here are the result:

Low ScrewUpRate

It seems good, but…

At high ScrewUpRate:

:)

So I wisely choose to move the platform from Rhino to OpenSCAD–Rhino is hard to digest for me.

Fortunately, OpenSCAD is beginner friendly, so I continued my journey to screw up donuts.

Here is the perfect donut:

Here is when 0.5 ScrewUpRate is applied:

And here is the complete failure donut:

At this point, I should say I was not trying to make donuts–what I secretly tried is alien ship.

Here is the scratch:

```module whoScrewedUpMyDonut(screwUpRate)
{
R = 179;
G = 97;
B = 28;
union(){
color([(1-screwUpRate)*R/255, (1-screwUpRate)*G/255, (1-screwUpRate)*B/255]){

rotate_extrude(convexity = 10, \$fn = 100)
hull(){
translate([15, 0, 0])
circle(r = 10);

translate([screwUpRate*25+20, screwUpRate*(-5), 0])
circle(r = 5);
}
}

for ( i = [0 : 9] )
{
rotate( i * 360 / 10, [0, 0, 1])
translate([(35+screwUpRate*25)/2, 0, 0])
sphere(r = (screwUpRate*25+25-(35+screwUpRate*25)/2)/2, \$fn = 50);
}
}
}

// choose a screwUpRate from 0-1
whoScrewedUpMyDonut(0);
```