+<html>
+ <head>
+ <title>The Thing the Rostock Was Printing in Make Magazine</title>
+ <script type="text/javascript" src="nt3d.js"></script>
+ <script type="text/javascript">
+ function pointy_sin(x) {
+ // Similar to sin(x*pi) over the range [-1,1],
+ // but with more movement towards the extremes.
+ // https://plus.google.com/101508799331795210529/posts/Yg7LmV8BpTw
+ return 3.7*x + (Math.log(1-.95*x)-Math.log(.95*x+1));
+ }
+ function rmm(base_separation, base_offset,
+ width, short_arc_height, tall_arc_height,
+ tube_width, steps_along, steps_around) {
+ var tau = Math.PI*2;
+ var path = [];
+ // Short arc
+ for (var i = 0; i < steps_along; i++) {
+ var progress = i/steps_along;
+ var x_separation = Math.cos(progress*tau/2)*base_separation;
+ var y_offset = -Math.sin(progress*tau/4)*base_offset;
+ var y_arc = Math.sin(progress*tau)*width;
+ var z_arc = -Math.cos(progress*tau)*short_arc_height + short_arc_height;
+ path.push([x_separation, y_offset + y_arc, z_arc]);
+ }
+ // Tall arc
+ for (var i = 0; i < steps_along; i++) {
+ var progress = i/steps_along;
+ var x_arc = -Math.cos(progress*tau*1.5)*base_separation;
+ var y_offset = -Math.cos(progress*tau/4)*base_offset;
+ var y_twist = -pointy_sin(progress*2 - 1)*width/2;
+ var z_arc = -Math.cos(progress*tau)*tall_arc_height + tall_arc_height;
+ path.push([x_arc, y_offset + y_twist, z_arc]);
+ }
+ return nt3d.closed_extrude(
+ path,
+ nt3d.circle(tube_width, steps_around),
+ nt3d.shapenormals_from_closed_path(path),
+ nt3d.pathnormals_from_point(path, [0,0,0]));
+ }
+ var params = [["Base separation", 30],
+ ["Base offset", 10],
+ ["Width", 40],
+ ["Short arc height", 60],
+ ["Tall arc height", 80],
+ ["Tube width", 10],
+ ["Steps along each arc", 70],
+ ["Steps around", 12]];
+ </script>
+ </head>
+ <body onload="nt3d.framework(rmm, params)">
+ <h1>The Thing the Rostock Was Printing in Make Magazine</h1>
+ <p><a href="http://www.flickr.com/photos/jcrocholl/8065968929/sizes/l/in/photostream/">This thing</a>.</p>
+<!-- My notes after staring at it:
+x y z
+1 0 0 Bottom front
+.5 1 .5s 1/4 up short arc
+0 0 s Top of short arc
+-.5 -1 .5s Coming down short arc
+-1 0 0 Bottom back
+1 .33 .5t 1/4 up long arc
+0 0 t Top of tall arc
+-1 -.33 .5t Coming down tall arc
+1 0 0 Bottom front (Repeated from above)
+
+x = cos over 1/2 period for short arc, -cos over 1.5 periods for tall arc
+y = sin over 1 period for short arc, sin/3 over 1 period for tall arc
+z = -cos over 1 period for short arc, -cos over 1 period for tall arc
+-->
+ </body>
+</html>
+