English 中文(简体)
Radial plotting algorithm
原标题:

I have to write an algorithm in AS3.0 that plots the location of points radially. I d like to input a radius and an angle at which the point should be placed. Obviously I remember from geometry coursework that 2(pi)r will give me an x on the point at the radius distance. The problem is I need to produce the x, y and the calculation is a bit more complicated.

A small push (or answer) would be wonderful.

Thanks.

最佳回答

Conversion from polar coordinates (r,theta) to cartesian coordinates (x,y):

x = xc + r cos(theta)
y = yc + r sin(theta)

where r = radius and theta = angle in radians and (xc,yc) is the center of the circle
问题回答

暂无回答




相关问题
Bounding ellipse

I have been given an assignement for a graphics module, one part of which is to calculate the minimum bounding ellipse of a set of arbitrary shapes. The ellipse doesn t have to be axis aligned. This ...

Line segment in a triangle

How can we check if a line segment falls partially or fully inside a triangle? Cheers.

Line Segments from a point

I have a point p, and 2 line segments in a 2D plane. Point p is a location of view from where camera is looking towards the line segments. I want to check if line segment 1 is partially or fully ...

Creating a surface of triangles from a set of 2D points

I have a set of points and I need to convert the set to (non-overlapping) triangles (or a big polygon if equivalent)... The application: I have a list of locations (latitude,longitude) from a country,...

Radial plotting algorithm

I have to write an algorithm in AS3.0 that plots the location of points radially. I d like to input a radius and an angle at which the point should be placed. Obviously I remember from geometry ...

Delete holes in a Polygon

I have a polygon determined by an Array of Points. This polygon is crossing itself making some holes in the polygon itself. My questions is: How can I omit this holes and just get the exterior ...

Finding cycle of 3 nodes ( or triangles) in a graph

I am working with complex networks. I want to find group of nodes which forms a cycle of 3 nodes (or triangles) in a given graph. As my graph contains about million edges, using a simple iterative ...

热门标签