Hi folks !
So this one is a very difficult one I think, so I'll try to make it as clear as possible.
So basically, I have geographic datas :
Nodes (#ID,lat,lng)
WayNodes (#ID,#node_id,#way_id, sequence)
Ways(#id,name)
And what I want is to get the intersection of two GROUPS of ways.
For example I need to find intersection(s) between...
Is there anyway that allows me to find all the intersection points between a line and a grid? ( The intersection circles are not drawn to scale with each other, I know)
A brute force way is to compute very intersection for the x-y grid with the line, but this algorithm is awfully inefficient (O(m*n), where m is the number of x grid an...
I'm trying to get the button to be right of the label. I set the tuple and am still not sure why it covers the label.
Also is there a good tutorial available on wxpython geometry?
import wx
import wx.lib.agw.gradientbutton as GB
def GetRoundBitmap( w, h, r ):
maskColor = wx.Color(0,0,0)
shownColor = wx.Color(5,5,5)
b = w...
Say there is a QHBoxLayout and some widgets in it. How to specify a widget width and hight in the layout, so that while resizing the widget which containes the layout the given width and hight stay constant?
...
Problem: Suppose you have a collection of points in the 2D plane. I want to know if this set of points sits on a regular grid (if they are a subset of a 2D lattice). I would like some ideas on how to do this.
For now, let's say I'm only interested in whether these points form an axis-aligned rectangular grid (that the underlying lattice...
Given n squares with edge length l, how can I determine the minimum radius r of the circle so that I can distribute all squares evenly along the perimeter of the circle without them overlapping? (Constraint: the first square will always be positioned at 12 o'clock.)
Followup question: how can I place n identical rectangles with height h...
I'm trying to implement a line-of-sight algorithm on a 2-dimensional grid. I know how it needs to work conceptually, but I can't think of how to implement it as an algorithm.
The basic idea is pretty simple. In pseudocode:
function LineOfSight(point1, point2): boolean
squares = GetListOfSquaresOnLine(point1, point2)
for each squa...
The gnomonic projection maps spherical triangles to straight-edged plane triangles.
But I've heard that the Chamberlin trimetric projection has less distortion, so I'd like to use that instead.
Alas, when I use my (extremely rough and probably buggy) implementation of Chamberlin trimetric projection to map the spherical triangle formed ...
Given a point (x1, y1) and an equation for a line (y=mx+c), I need some pseudocode for determining the point (x2, y2) that is a reflection of the first point across the line. Spent about an hour trying to figure it out with no luck!
See here for a visualization - http://www.analyzemath.com/Geometry/Reflection/Reflection.html
...
How to find orientation (cw or ccw) of a closed curve that's formed by Bezier cubic segments?
...
Greetings all,
In the application I am developing I have polygons as show in the picture
My data structure is double-linked list as follows.
RzCurve {
RzNode *head;
};
RzNode{
double x;
double y;
RzNode *next;
RzNode *prev;
}
I want to implement an algorithm which allows user to add a new Node by clic...
I have a path shape that I would like to combine lines that have different line thicknesses?
The StrokeThickness property is set on the Path object so I cannot change it for different lines. This same issue would arise if I wanted to change my line color.
The reason I want to do this is so that I can draw an arrowhead. Charles Petzold a...
I'm playing around with code like this:
<s:Button id="test" label="test" transformX="{Math.floor(test.width/2)}" rotationY="20" x="20" y="20" />
The button is rotated on the Y axis and the rotate pivot is in the middle of the button.
This will create a button that looks something like this:
The rotated button is, visually, filling...
Hi everyone,
I'm writing my own software rasterizer in Java, and I ran into some trouble with it... take a look at a sample image, please:
Image
This sample just draw simple square grid on a plane. Everything works fine until I move camera close enough for some points to move behind it. After that, they're no longer projected correctl...
I'm working on opengl project.
I set up perspective projection and render a transformed rectangle (rotated, scaled)
How i can calculate rectangle's bounding box (rectangle position,size)
Thank you
...
How do I calculate the intersection points of two circles. I would expect there to be either two, one or no intersection points in all cases.
I have the x and y coordinates of the centre-point, and the radius for each circle.
An answer in python would be preferred, but any working algorithm would be acceptable.
...
There is a resize DOM event, even for generic elements but I can't find a event that is fired when the position of an element changed. I'd like to have an event that is fired whenever the geometry of an element is changed. It can be Mozilla specific, because I write a Firefox Add-On.
Edit: Or is there a way to pin an element to another ...
Hi,
I have two Lines: L1 and L2. I want to calculate the angle between the two lines. L1 has points: {(x1, y1), (x2, y2)} and L2 has points: {(x3, y3), (x4, y4)}. How can I calculate the angle formed between these two lines, without having to calculate the slopes? The problem I am currently having is that sometimes I have horizontal lin...
Challenge
The shortest program by character count that accepts standard input of the form X-Y R, with the following guarantees:
R is a non-negative decimal number less than or equal to 8
X and Y are non-negative angles given in decimal as multiples of 45 (0, 45, 90, 135, etc.)
X is less than Y
Y is not 360 if X is 0
And produces on ...
Hello,
I have a table that contains a GEOMETRY data type. SQL Server 2008 ships with a built in function to convert these GEOMETRY data types to GML - GEOMETRY.AsGml(). I believe this function is nothing more than a custom user defined function.
This function works exactly as expected, until I try to use it in a view that is joined t...