![]() ![]() The basic idea: I loop from 0 to 2π radians (a full circle) in steps of angleStep radians at a time. The relevant code from the draw() function: float x = width / 2 Also, I’m a beginner, so yes, this is very basic stuff.)įirst off, I started a new Processing sketch and drew a circle: (Disclaimer: this is all unoptimized code that is almost certainly not the best way to do this. Reply via email or office hours Sine circle test animation Wednesday, May 22, 2013Īs I’ve been tinkering around with graphics coding, I wanted to figure out how to map a sine wave onto a circle. Thanks to Tod Robbins for the heads up about PlotDevice. The only semi-important downside for me right now is that it doesn’t have OpenType features or tracking/kerning controls for text, but it looks like both are coming soon.įor fun, a watersun emblem ( code), based off some code in the PlotDevice geometry tutorial: PlotDevice is vector-based (rather than raster) and exports to PDF, which means output is high quality and not limited to pixel resolution (e.g., I can create very fine hairlines). ![]() Much easier than copying and pasting and tweaking in Illustrator or InDesign. For example, it took around fifteen minutes to write some quick code to draw genealogy sparklines ( code):įor this sample, I have a draw_sparkline function that takes an object with a name, birth/death dates, list of marriages, and list of children, and it handles the drawing. I don’t know why I didn’t think of this before with Processing, but it dawned on me that PlotDevice would be perfect for prototyping some of the design experiments I do. I recently came across PlotDevice, a Python-based graphics environment for Mac, similar to Processing and NodeBox. ![]()
0 Comments
Leave a Reply. |