The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
1answer
53 views

How to compute barycentric coordinates in a systematic and efficient way?

As part of a ray tracer implementation, I need to compute the barycentric coordinates in a triangle in 3D in order to decide if a ray hits the triangle or not. In theory this could be done by simply ...
2
votes
3answers
266 views

Trying to code the points on a circle [closed]

I am trying to understand this: I wrote a code for points on a circle of radius 1. Note that the first and last point intentionally coincide. do i=1,imax X(i,1) = ...
1
vote
1answer
347 views

Find the new coordinates using a starting point, a distance, and an angle

Okay, say I have a point coordinate. var coordinate = { x: 10, y: 20 }; Now I also have a distance and an angle. var distance = 20; var angle = 72; The problem I am trying to solve is, if I want ...
20
votes
9answers
2k views

How to check if 4 points form a square?

Assume I have 4 points (they are 2-dimension), which are different from each other, and I want to know whether they form a square. How to do it? (let the process be as simple as possible.)
0
votes
2answers
237 views

projective geometry: how do I turn a projection of a rectangle in 3D into a 2D view

So the problem is that I have a 3D projection of a rectangle that I want to turn into 2D. That is I have a photo of a sheet of paper laying on a table which I want to transform into a 2D view of that ...
2
votes
2answers
176 views

How to detect two moving shapes overlapped?

Given a list of circles with its coordinates (x and y) that are moving every second in different direction (South-East, South-West, North-East and North-West), and the circle will change direction if ...
-2
votes
1answer
107 views

What do ptLineDist and relativeCCW do? [closed]

I saw these methods in the Line2D Java Docs but did not understand what they do? Javadoc for ptLineDist says: Returns the distance from a point to this line. The distance measured is the ...
3
votes
3answers
374 views

Algorithm to calculate trajectories from vector field

I have a two-dimensional vector field, i.e., for each point (x, y) I have a vector (u, v), whereas u and v are functions of x and y. This vector field canonically defines a set of trajectories, i.e. ...
1
vote
0answers
60 views

Handling the Beginning of a Line with Catmul-Rom Splines [closed]

I have some A* Path-finding which generates a set of points, I wish to smooth the line generated by this algorithm. I know one way to do this would be Catmul-Rom Splines but I'm not sure what to set ...
9
votes
1answer
145 views

How do graphics programmers deal with rendering vertices that don't change the image?

So, the title is a little awkward. I'll give some background, and then ask my question. Background: I work as a web GIS application developer, but in my spare time I've been playing with map ...
0
votes
3answers
297 views

Calculate Ellipse based on 4 points

I need to move an object based on 100 images rotating. The object needs to move in a path that is forming an ellipse when I'm rotating the image based on my gestures. I have 4 points, 2 pairs of ...
3
votes
4answers
827 views

Area calculation of irregular shapes

Is there any algo that can help splitting irregular shape into regular shapes, and eventually calculate the area of the main object by summing the areas of those regular objects?