New answers tagged circle
1
This is just using regular old sine and cosine to step around the circumference of a circle and place points. You just need to know the center of the circle, the radius and how many points you want. The following pseudo code will output a set of points that make up the positions of dots you need to make a circle of points:
circleXY(Vector3f center, float ...
0
I've implemented a demo of a ball bouncing in a circle on jsfiddle using the algorithm described by Sam Hocevar:
http://jsfiddle.net/klenwell/3ZdXf/
Here's the javascript that identifies the point of contact:
find_contact_point: function(world, ball) {
// see http://gamedev.stackexchange.com/a/29658
var A = world.point();
var B = ...
Top 50 recent answers are included