tagged [geometry]
How do I create a circle or square with just CSS - with a hollow center?
How do I create a circle or square with just CSS - with a hollow center? It should just basically be an outline of the square or circle - that I can style accordingly (i.e. change the color to whateve...
- Modified
- 5 Dec at 21:27
How do I determine the intersection point of two lines in GDI+?
How do I determine the intersection point of two lines in GDI+? I'm using .NET to make an application with a drawing surface, similar to Visio. The UI connects two objects on the screen with Graphics....
Draw radius around a point in Google map
Draw radius around a point in Google map I'm using the Google Maps API and have added markers. Now I want to add a 10 mile radius around each marker, meaning a circle that behaves appropriately while ...
- Modified
- 9 Jan at 03:23
Checking if a point is inside a rotated rectangle
Checking if a point is inside a rotated rectangle I know this question has been asked a few times before, and I have read various posts about this. However I am struggling to get this to work. ``` boo...
Proper Trigonometry For Rotating A Point Around The Origin
Proper Trigonometry For Rotating A Point Around The Origin Do either of the below approaches use the correct mathematics for rotating a point? If so, which one is correct? ``` POINT rotate_point(float...
- Modified
- 2 Jul at 00:57
Shortest distance between a point and a line segment
Shortest distance between a point and a line segment I need a basic function to find the shortest distance between a point and a line segment. Feel free to write the solution in any language you want;...
- Modified
- 13 May at 21:31
Generate 2D cross-section polygon from 3D mesh
Generate 2D cross-section polygon from 3D mesh I'm writing a game which uses 3D models to draw a scene (top-down orthographic projection), but a 2D physics engine to calculate response to collisions, ...
Approximating an ellipse with a polygon
Approximating an ellipse with a polygon I am working with geographic information, and recently I needed to draw an ellipse. For compatibility with the OGC convention, I cannot use the ellipse as it is...
- Modified
- 19 Aug at 19:2
Check if a point is in a rotated rectangle (C#)
Check if a point is in a rotated rectangle (C#) I have a program in C# (Windows Forms) which draws some rectangles on a picturebox. They can be drawn at an angle too (rotated). I know each of the rect...
The algorithm to find the point of intersection of two 3D line segment
The algorithm to find the point of intersection of two 3D line segment Finding the point of intersection for two 2D line segments is easy; [the formula is straight forward](http://local.wasp.uwa.edu.a...
- Modified
- 16 Sep at 00:45
Using the "animated circle" in an ImageView while loading stuff
Using the "animated circle" in an ImageView while loading stuff I am currently using in my application a listview that need maybe one second to be displayed. What I currently do is using the @id/andro...
- Modified
- 24 Jun at 10:26
A simple algorithm for polygon intersection
A simple algorithm for polygon intersection I'm looking for a very simple algorithm for computing the polygon intersection/clipping. That is, given polygons `P`, `Q`, I wish to find polygon `T` which ...
WPF: How to apply a GeneralTransform to a Geometry data and return the new geometry?
WPF: How to apply a GeneralTransform to a Geometry data and return the new geometry? Having some Geometry data and a Transform how can the transform be applied to the Geometry to get a new Geometry wi...
How to tell whether a point is to the right or left side of a line
How to tell whether a point is to the right or left side of a line I have a set of points. I want to separate them into 2 distinct sets. To do this, I choose two points ( and ) and draw an imaginary l...
- Modified
- 16 Apr at 05:36
Generate a random point within a circle (uniformly)
Generate a random point within a circle (uniformly) I need to generate a uniformly random point within a circle of radius . I realize that by just picking a uniformly random angle in the interval [0 ....
- Modified
- 8 Jun at 05:59
Cannot use geometry manager pack inside
Cannot use geometry manager pack inside So I'm making an rss reader using the tkinter library, and in one of my methods I create a text widget. It displays fine until I try to add scrollbars to it. He...
How to calculate an angle from three points?
How to calculate an angle from three points? Lets say you have this: Assume that `P1` is the center point of a circle. It is always the same. I want the angle that is made up by `P2` and `P3`, or in o...
Simple calculations for working with lat/lon and km distance?
Simple calculations for working with lat/lon and km distance? Is there a simple calculation I can do which will convert km into a value which I can add to a lat or lon float to calculate a bounding bo...
- Modified
- 26 May at 06:1
Lat/Lon + Distance + Heading --> Lat/Lon
Lat/Lon + Distance + Heading --> Lat/Lon So: I have the following function, adapted from a formula found online, which takes two lat/lon coordinates and finds the distance between them in miles (along...
- Modified
- 18 Dec at 15:53
Calculate coordinates of a regular polygon's vertices
Calculate coordinates of a regular polygon's vertices I am writing a program in which I need to draw polygons of an arbitrary number of sides, each one being translated by a given formula which change...
Find the point on a circle with given center point, radius, and degree
Find the point on a circle with given center point, radius, and degree It's been 10 years since I did any math like this... I am programming a game in 2D and moving a player around. As I move the play...
Finding the smallest circle that encompasses other circles?
Finding the smallest circle that encompasses other circles? If a circle is defined by the X, Y of it's center and a Radius, then how can I find a Circle that encompasses a given number of circles? A s...
What sort of unit does NetTopologySuite return distances in, and how can I convert it to miles/km?
What sort of unit does NetTopologySuite return distances in, and how can I convert it to miles/km? Whenever I use FreeMapTools to calculate the distance between myself and my friends postcode, it give...
- Modified
- 4 Mar at 20:40
Finding holes in 2d point sets?
Finding holes in 2d point sets? I have a set of `2d points`. They are `X,Y coordinates` on a standard Cartesian grid system(in this case a `UTM zone`). I need to find the holes in that point set prefe...
- Modified
- 26 Feb at 10:36
Calculating point on a circle's circumference from angle in C#?
Calculating point on a circle's circumference from angle in C#? I imagine that this is a simple question, but I'm getting some strange results with my current code and I don't have the math background...