I am trying to plot some spherical marks onto a sphere. Here is a screenshot:
The little black spheres are being drawn with the following code:
// Ellipse
fill(0);
noStroke();
pushMatrix();
translate(x, y, z);
beginShape(TRIANGLE_STRIP);
for(float t=0; t<TWO_PI; t+=TWO_PI/12) {
fill(0,255);
vertex(0,0);
fill(0,0);
vertex(4*cos(t),4*sin(t));
}
endShape();
popMatrix();
The problem I am having is that the shapes are rotated at random angles and are not facing outwards from the point they are drawn at. I want them to be rotated so that they act like points on the sphere.
I want to draw connection lines from one 'node' to another using single pixel lines. I've had a google and can't seem to find what I'm looking for, can anyone help? I found this thread
http://processing.org/discourse/yabb2/YaBB.pl?num=1264522077 but the example given doesn't work for me (yes I have toxiclibs installed.)