I was wondering if there's a smart method to distribute points/circles in a radial way.
Let's say you have 100 ellipses with a radius of 10 pixels, how can you determine how may circle-layers are needed and how many/where will their cells be placed on?...
I am trying to rotate a mesh towards the center of the screen so that it 'looks' at the center. This needs 3 angles to rotate the mesh in a x, y and z direction. The problem is, i dont know how to retrieve those values. At this moment i am in a fight with vectors, and trying to understand the dot and cross product, but with no succes...
to run the sketch, you need the peasycam library and the hemesh library
import processing.opengl.*; import javax.media.opengl.*; // cam PeasyCam cam; PVector center, angle, child; HE_Mesh m; PVector direction = new PVector(); void setup() { size(800,600, OPENGL); background(255);
// camera cam = new PeasyCam(this, 100); cam.setMinimumDistance(1); cam.setMaximumDistance(500); center = new PVector(0,0,0); angle = new PVector(1,0.1,0.3); angle.normalize(); child = new PVector();
child.set(angle); child.mult(100);
//angle from child to center PVector angleToCenter = new PVector(); angleToCenter.set(angle); angleToCenter.mult(-1);
float d = 10; float h = 50; float w = 70;
HEC_Creator c = new HEC_Box(this).setDepth(d).setHeight(h).setWidth(w).setWidthSegments(10).setHeightSegments(10).setDepthSegments(10); m = new HE_Mesh(c);
Tiny bit by tiny bit i am getting the hang of working with vectors, but i don't know how to fix this one... illustration!
I have a center, from which i create an angle with a random magnitude. From the new point, I want to create a random amount of children, who should "branch" from the original angle, and being distibuted over an ellipse...
The Hemesh library is my latest discovery, and I was verrry pleased with its features! I only miss 1 primitive (if you could it like that), and that is the torus (donut/toroid). There is a torus shape in the Shapes3D library, but couldn't find the little algorithm to create it in hemesh...
hopefully someone knows how to create some donuts which can be manipulated!
//
Unfortunately i found no texture options in the library, any d-tour suggestions to accomplish this with the hemeshes?
I'm trying to build a hierarchy tree, but i'm having a problem with the following.
The first class is called 'seed', that's were everything starts from.
In there another class is called, 'child_v1'.
The problem is that you can't create a 'child_1' class in a child_1 object... then they are referring to each other and processing doesn't like that!
But it is also stupid to make a 'child_v2' , 'child_v3' etc. class, because then you allready have a pre-described amount of children/layers.... and it should vary from 1/2 untill .... a lot?
hopefully someone can help me with this program problem :) should be a tough cookie for a more experienced person :)