I'd like to play around with some (2D) Delaunay triangulations, and am looking for a reasonably small library to work with. I'm aware of CGAL, but I was wondering if there was something fairly simple and straightforward out there.
Things I would like to do:
create a triangulation of an arbitrary set of points
find triangle an arbitra...
I'm looking for an algorithm that would move a point around an arbitrary closed polygon that is not self-crossing in N time. For example, move a point smoothly around a circle in 3 seconds.
...
I've got a 2D closed polyline, which is reasonably smooth. The vertices that define the polyline however are not spaced equally. Sometimes two will be very close, sometimes as many as four will be very close together.
I'd like to smooth the polyline, but a regular averaging algorithm tends to shrink the area:
for (int i = 0; i < (V.Len...
I am programming an algorithm where I have broken up the surface of a sphere into grid points (for simplicity I have the grid lines parallel and perpendicular to the meridians). Given a point A, I would like to be able to efficiently take any grid "square" and determine the point B in the square with the least spherical coordinate distan...
What would be the best approach to optimizing spatial index on geometry data? Specifically:
How to choose values for grid hierarchy?
How to choose value for Max cells per object rule?
These are very much data related so I'm looking for a sensible approach to analyzing the data and then testing out the values.
...
I have noticed in other languages such as Java that there are Objects such as Vector2d that have a multiply method. How would I do the same with Actionscript 3? I know that the Point or Vector3D classes have add/substract methods, but neither offer multiply/divide methods.
What is the best way to multiply two Point objects? would it be ...
I know that I can use a KD-Tree to store points and iterate quickly over a fraction of them that are close to another given point. I'm wondering whether there is something similar for lines.
Given a set of lines L in 3D (to be stored in that data structure) and another "query line" q, I'd like to be able to quickly iterate through all l...
As you may be able to tell from this screenshot, I am trying to make a physics engine for a platformer I am working on, but I have run into a definite problem: I need to be able to find out the angle of any one of the triangles that you can see make up this mesh, so that I can work out the rotation and therefore angular acceleration of t...
what is plane sweep algorithm to compute all intersection points between the circles?
...
The world consists of many (1k-10k) rectangles of similar sizes, and I need to be able to quickly determine potential overlaps when trying to add a new rectangle. Rectangles will be added and removed dynamically. Are R-Trees appropriate here? If so, are there any good libraries I should consider? (I'm open to suggestions in any language)...
I want to solve geometry problems in online programming contests. But whenever I read them, I just find too difficult. Please suggest some books and resources which I can study computational geometry.
...
I have two points a and b, and a bounding box at 0,0,w,h. Both points are within the bounding box. How do I extend the line segment created by a and b to find points c and d where the line intersects the box?
*c-------------*
| \ |
| \ |
| a |
| \ |
| \ |
| b |
| ...
I want to find out the X and Y position of a point which is halfway between a point and another point, in VB.net. Since there is no "direction" property (which would make this much easier...), I have no idea how to do this.
C# code is acceptable as well, though I would prefer vb as it wouldn't require a port.
Thanks for the help, this ...
Hi All,
I'm creating a webapp that has various unrelated data types (House, Contact, Article, Recipe, Fact -etc). I am giving each one a 'thumbnail' automaticaly. (User can then manually upload there own image).
Currently, I'm grabbing an image from Flikr, crop or strech to 80x80 & adding a mosaic filter at 10 pixels. The result is a n...
I have a circle. Inside the circle is a point. I have a vector originating at this point. I'd like to know what point on the circle this vector intersects. Here is a drawing:
The red dot is the point I am trying to determine.
I know these things: the center of the circle, the origin of the vector, and the direction of the vector.
I ...
I have a problem with the Google Maps API only allowing 1000 features per map.
In a database, I keep records of areas. Each area has associated with it a heap of KML polygon information, stored as an XML string. Each area is made up of one or more polygons.
Given some user input, a handful of these areas are combined into one <Placemar...
Hi,
I'm currently writing an application that actually acts as a "cut" tool for 3D meshes. Well, I had some problems with it now which I am clueless on how to solve, since it is my first application.
I have loaded a model from an object file onto the canvas, then on the same canvas, I use the mouse drag event to draw lines to define t...
How can I find equation of a line or draw a line, given a starting point, length of line and angle of line (relative to x-axis)?
...
My program generated triangles automatically, however the arrangement of the triangles are random on JPanel. How can I plot the triangle in a grid order? Thanks.
EDITED:
for(int i = 0; i < 10; i++)
{
xCoord[0] = generator.nextInt(MAX_WIDTH);
yCoord[0] = generator.nextInt(MAX_HEIGHT);
xCoord[1] = (int) (xCoord[0] - xWidth);...
Hi
I need a algorithm for detecting if a circle has hit a square, and I saw this post:
Circle-Rectangle collision detection (intersection)
It looks like I should go for ShreevatsaR's answer, but I am a math fool, and I have no idea how to finish the algorithm. Could anyone find the time to make a complete example for me please, I have ...