I have a parametric curve, say two vectors of doubles where the parameter is the index, and I have to calculate the angle of the tangent to this curve at any given point (index).
Any suggestion or link about how to do that?
Thanks.
...
Hi,
I have a line segment AB between two WGS84 coordinates on the earth's surface (or, alternatively, on an ellipsoid), and need to calculate the distance between a point P and the point nearest to P that is on line segment AB. How can I do this?
Any help is greatly appreciated.
Regards,
Jochen
...
Hi,
I want to be able to calculate the direction of a line to eye coordinates and store this value for every pixel on the line using a vertex and fragment shader. My idea was to calculate the direction gradient using atan2(Gy/Gx) after a modelview tranformation for each pair of vertices then quantize this value as a color intensity to pa...
So I am using the Three20 library for an iPhone app, and want to use the TTSpeechBubbleShape style for a view. But the triangle doesn't seem to want to draw on the left or right sides. I see in the source that it's a lot of geometry and was wondering if anyone had tackled this or knew how to fix it.
...
What's the best way to learn the essentials of geometry (and other types of math) used in drawing/graphics programming - e.g. curves (like bezier curves), transformations, matrices, etc.?
...
I'm storing Points Of Interest (POI) in PostgreSQL database, and retrieve them via PHP script to Android application. To reduce internet usage I want my mobile app to know if there are any points in the neighborhood of currently displayed area.
My idea is to store bounds of the rectangle containing all points already retrieved (in other...
I have a number of rectangles of various widths and heights. I have a larger rectangular platform to put them on. I want to pack them on one side of the platform so they spread in the lengthwise (X) dimension but keep the widthwise (Y) dimension to a minimal. That is to place them like a tetris game. There can be no overlaps but there ca...
Hiya.
can anyone assist me in finding the proper formula for quad normalization ?
using c++ with opengl.
thank you!
...
I'm moving a character (ellipsoid) around in my physics engine. The movement must be constrained by the static geometry, but should slide on the edges, so it won't be stuck.
My current approach is to move it a little and then push it back out of the geometry. It seems to work, but I think it's mostly because of luck. I fear there must b...
Hello everyone,
I have an interesting problem here I've been trying to solve for the last little while:
I have 3 circles on a 2D xy plane, each with the same known radius. I know the coordinates of each of the three centers (they are arbitrary and can be anywhere).
What is the largest triangle that can be drawn such that each vertic...
Hello:
I wish to implement soft shadows produced by area lights in my raytracer. I'm having trouble generating the random samples. So I have a scene in which I have an area light (represented as a circle) whose world (x,y,z) coordinates of the center are given, the radius is given, the normal of the plane on which the circle lies is giv...
Given curves of type Circle and Circular-Arc in 3D space, what is a good way to compute accurate bounding boxes (world axis aligned)?
Edit: found solution for circles, still need help with Arcs.
C# snippet for solving BoundingBoxes for Circles:
public static BoundingBox CircleBBox(Circle circle)
{
Point3d O = circle.Center;
Vect...
Hello:
I wish to determine if a Point P(x,y,z) is inside a 2D circle in 3D space defined by its center C (cx, cy, cz), radius R, and normal to the plane the circle lies on N.
I know that a point P lying on a 2D circle in 3D space is defined by:
P = R*cos(t)*U + R*sin(t)*( N x U ) + C
where U is a unit vector from the center of the ci...
I'm trying to put together a simple program that will let me visualize a series of consecutive cuts on a wood panel using a router with a particular cutting head. I'm trying to find a decent geometry library that will give me a shortcut through the CAD-like stuff.
Specifically, I'd like to be able to define a rectangular solid (the w...
When using the usual formulas to calculate intersection between two 2D segments, ie here, if you round the result to an integer, you get non-symmetric results.
That is, sometimes, due to rounding errors, I get that intersection(A,B)!=intersection(B,A).
The best solution is to keep working with floats, and compare the results up to a c...
Question: Is it possible to use/retrieve Geodata from Google-Earth ?
What I want to do is take a little area, get terrain information (coordinates, height, elevation) and simulate how the selected area would be flooded at specified amounts of rain for a specified amount of hours.
...
This is not a homework. I am asking to see if problem is classical (trivial) or non-trivial. It looks simple on a surface, and I hope it is truly a simple problem.
Have N points (N >= 2) with
coordinates Xn, Yn on a surface of
2D solid body.
Solid body has some small rotation (below Pi/180)
combined with small shifts (below 1% of di...
I have N rectangles with sides parallel to the x- and y-axes. There is another rectangle, model. I need to create an algorithm that can tell whether the model is completely covered by the N rectangles.
I have some ideas. I think that first, I need to sort the rectangles by their left side (it can be done in O(n log n) time), and then...
I'm trying to auto-detect the axis of rotation on a 3d pointcloud.
In other words, if I took a small 3d pointcloud, chose a single axis of rotation, and make several copies of the points at different rotation angles, then I get a larger pointcloud.
The input to my algorithm is the larger pointcloud, and the desired output is the sing...
Hi all,
I have the need to serialize an Area object (java.awt.geom.Area) in a socket. However it doesn't seem to be serializable. Is there a way to do such thing? Maybe by converting it into a different object?
Thanks in advance
...