December, 2009

Dec
24

Goodbye 2009


EastRiverWinter

Thank you all for a wonderful semester. I saw some really great work. Together we discussed typography, some graphic design, and of course Processing. Ah… data visualization. I hope you’ve felt productive and have a wonderful break. And waste some time with Browser Pong.

Code Examples
Here’s a reverse-chronological list (hopefully somewhat complete) of code examples from this past semester. This may serve as a helpful reference for you when trying to quickly solve (Rubik’s Cube style) problems in the future. Maybe.

Midpoint Circle Algorithm
Thank you for posting this Chris. See also http://en.wikipedia.org/wiki/Midpoint_circle_algorithm

2D clicks in a 3D world
This has come up a few times in class, “How do I do a mouseover or mouseclick on a rotating / spinning object in 3D space?” The above is just a collection of links to Processing topics that will help you answer that question.

Textures [via Processing]
Processing’s guide to textures.

Presenter
Paths, Agents, Scenes… This little package allows you to really build up a presentation that can translate, rotate, and animate along nested timelines. Great for stitching together multiple complex visualizations.

Data Ripping
Using fuzzy found image data to your benefit. Hue and Saturation are usually key here.

Making a Mystery Image
A brief program for making the scrambled RGB (XYZ) data image for the previous homework assignment.

Decomposing Images
This is the “Mystery Image” (“Space Neighbors”) assignment. PImages, loadImages(), OpenGL, etc.

MSAFuild Dynamics
(Thanks for pointing out this fluid dynamics library Peter.)

Weather Example 2
Use a Class and ArrayList to create many objects. Grab weather XML, animate many objects in 3D, pause, save frames, etc.

Tim’s QualityCam
An ITP homebrew camera library for Processing courtesy of Tims.

Peasy 3D Camera
Processing Library for manipulating the 3D camera.

Weather Example 1
Grab weather XML, animate a simple shape in 3D, pause, save frames, etc.

Push / Pop Matrix
Use pushMatrix() and popMatrix() to add layers of control to your rotations and translations in 3D space.

Translate and Rotate
Position and orient objects in 3D space using OpenGL.

Weather RSS
Grab an RSS (XML) feed and search for Content and Attribute values inside.

Robert Penner’s Easing
Processing library for easing motions like ease-in, ease-out, bounce, etc.

Text and CSV
Parse CSV files from your sketch’s “/data” directory.

Theme and Variation
Visualize two hard-coded variables.

And of course, this should be bookmarked in your browser :
http://processing.org/reference

Dec
17

Week 14: And… done!


12:20~12:30
Load up your presentations and fill out the teacher evaluation forms. I’ll be outside of the classroom showing our guest critics around ITP. Please also write your group’s (or solo act’s) name on the whiteboard so we can establish a presentation order.

12:40
Your teacher evaluation forms should be completed; choose someone among you to deliver these to Gordy in the office. All of your presentations should also be ready to go, either on the classroom’s laptop or on your own machine (configured in such a way that you can quickly switch the projector cable to your machine and go).

I will introduce our critics: Holly Gressley, Renda Morton, and Andy Pressman of Rumors. They’ll describe themselves briefly and we’ll move on to your presentations.

Continue reading →

Dec
16

Tomorrow: Final Presentations


ITPFinal1

Subject: VisDat. Our final class
From: Stewart Smith <-------.-----@nyu.edu>
Date: December 16, 2009 11:18:43 AM EST

Tomorrow is Thursday, December 17th.

Sadly it is also our final class together. We will meet as usual, at 12:30 in our regular classroom at ITP. I have some teacher evaluation forms for you to fill out at the beginning of class as you load your final projects onto the room’s laptop or do any other presentation preparation. (I’ll be out of the classroom while you do this; showing around our guest critics.)

Our final critics are the three principals of Rumors, a design studio in Brooklyn. They are Holly Gressley, Renda Morton, and Andy Pressman. Please see their website where you can view work, bios, and their blog. http://rumors-online.com

Bring your final projects, a pen to fill out evaluation forms with, and plastic safety glasses just incase there’s a misfire.

+
Stewart

Dec
10

Math Bagel


mathbagel

http://www.georgehart.com/bagel/bagel.html

Dec
10

Week 13: Surprise. We’re nearly done.


surprisekitty

Hackers and Painters
We’ll begin class by talking a bit about the Paul Graham listening assignment. Let’s take a look at the original homework assignment. How do you feel about the assertion that “painters decide what to paint and then they have to paint it.” Does the metaphor hold up for “great hackers?” If you were put off by the original Paul Graham listening assignment, did this one win you over? Or was it more of the same? (Let’s not argue too long on this, there’s a lot more to get to.)

Twitter Earth
Next up, are there any comments on the Twitter assignment? Did you feel there was a subtle elegance to using the rotate( radians( i )) combo when dealing with actual latitudes and longitudes? Let’s talk about midpoints for a moment; or rather let Chris talk about them.

Final Projects
Ok. So much to do and oh so very little time. Let’s use the remainder of our time for an in-class work session where I’ll meet with each group (or solo act) about the progress of your final projects. I may occasionally ask for everyone’s attention to go over some example or topic that has broader relevance.

Final Class
Obviously you should bring in your final projects and be prepared to present them. Less obvious; bring a pair of plastic safety glasses. No reason. No reason at all.

Dec
03

MOTHER F*CKING MID POOOOOOIINTTT!!!


Ok, first off, here is my issue:

1) I have two distinct points on a globe and i want to draw a line between them at a nice arc.

From what I understand there are two solutions:

a) calculate the x, y, z of those boxes and then draw an arc between them.  This turns out to be incredibly difficult, but using screenX, screenY, and screenZ is a start.

You use the mid point equation:

xMid = (x1 + x2)/2
yMid = (y1 + y2)/2
zMid = (z1 + z2)/2

and *snoooooorreeee*

f*ck math, who cares…

2) My way, abstractly, check code for exact solution, is to calculate the midpoint of the long, lat coordinates and recursively plot points over and over till you have a line.  Here is the meat of that:

float lat1 = radians( -34 ); float lon1 = 151; // sydney
float lat2 = radians( 37 ); float lon2 = 127; // seol

float dLon = radians( lon2 - lon1 );

float Bx = cos( lat2 ) * cos( dLon );
float By = cos( lat2 ) * sin( dLon );

float lat3 =  atan2( sin( lat1 ) + sin( lat2 ),
                   sqrt( ( cos( lat1 ) + Bx ) *
                   ( cos( lat1 ) + Bx ) + By * By ) );

float lon3 = radians( lon1 ) + atan2( By, cos( lat1 ) + Bx );

At this point you essentially done. Just rotate twice and translate once and draw the f*cking box or point or whatever.

To finish off the line just do this over and over again recalculating the midpoint. You might calculate the number of times to recurse based on the distance which is calculated:

float dLon = radians( lon2 - lon1 );

Animate it? No f*cking problem. Just store longs and lats as you go and animate the drawing of the boxes!

– chris allick