Using C#:
How do I get the (x, y) coordinates on the edge of a circle for any given degree, if I have the center coordinates and the radius?
There is probably SIN, TAN, COSIN and other grade ten math involved... :)
...
Hi folks,
I have a 256x256 texture in my view frustum that I need to move to a z-position where the texture is replicated on-screen at ACTUAL size.
What I have so far is:
const float zForTrueScale = -((itemSize/2) / tanf(DEGREES_TO_RADIANS(fieldOfView/2)) ) * 2;
where itemSize is the size of my texture in world space (2.0 u...
In AS3, I have a Sprite that has a Z axis rotation applied.
How do I calculate that Sprite's dimensions (it's original size) from Sprite.rotationZ and Sprite.getRect(...)?
...
Hi,
I'm trying to figure out some calculations using arcs in 3d space but am a bit lost. Lets say that I want to animate an arc in 3d space to connect 2 x,y,z coordinates (both coordinates have a z value of 0, and are just points on a plane). I'm controlling the arc by sending it a starting x,y,z position, a rotation, a velocity, and a...
I'm an inspector at a machine shop. I have an html report generated by another inspector that has some problems I need to fix. This isn't the first time: I need something better than PowerShell and RegEx. (Fear not internet warriors, I know I shouldn't use RegEx for html. I'm using HtmlAgilityPack now.)
I'm aware there are a lot of simi...
How would you find the signed angle theta from vector a to b?
And yes, I know that theta = arccos((a.b)/(|a||b|)).
However, this does not contain a sign (i.e. it doesn't distinguish between a clockwise or counterclockwise rotation).
I need something that can tell me the minimum angle to rotate from a to b. A positive sign indicates a ...
I have the start point (x1,y1) and the desired length and angle of the line.
If the angles were directions, 0 degrees is W, 90 is N, 180 is E and 270 is S. I can modify this if needed.
How can I use the start point, length and angle to determine the end point(x2, y2)?
...
Hi folks,
I am developing a mathematical parser which is able to evaluate String like '5+b*sqrt(c^2)'. I am using ANTLR for the parsing and make good progress. Now I fell over the Java class BigDecimal and thought: hey, why not thinking about precision here.
My problem is that the Java API does not provide trigonometric methods for Big...
I am trying to have flash draw a line from the center of the stage out and increment around the stage. Not sure what math I would use to do this though. So far I have the line going out to a certain point but not sure how to change that point so that it circles around whatever the dimensions of my stage would be.
So far I have this:
va...
So I've been messing around with http://processingjs.org/.
I want to draw a circle that has a bunch of lines protruding from it. Each of these lines should perpendicular to the tangent of the circle.
I don't necessarily need to know how to do this in processing.js, but I don't really remember my trigonometry, so more of an explanation ...
Hi, using a Latitude and Longitude value (Point A), I am trying to calculate another Point B, X meters away bearing 0 radians from point A. Then display the point B Latitude and Longitude values.
Example (Pseudo code):
PointA_Lat = x.xxxx;
PointA_Lng = x.xxxx;
Distance = 3; //Meters
bearing = 0; //radians
new_PointB = PointA-Distance;...
I know the coordinates of A, B and C.. I also know of a vector V originating from C..
I know that the vector intersects A and B, I just don't know how to find i.
Can anyone explain the steps involved in solving this problem?
Thanks alot.
http://img34.imageshack.us/img34/941/triangleprob.png
...
hello,
i have two coordinates on a 2d plane in 3d space, and am trying to rotate one coordinate (a vector) to face the other coordinate. my vertical axis is the y-axis, so if both of the coordinates are located flat on the 2d plane, they would both have a y-axis of 0, and their x and z coordinates determine their position length/width-w...
Hey there guys, I'm learning processing.js, and I've come across a mathematical problem, which I can't seem to solve with my limited geometry and trigonometry knowledge or by help of Wikipedia.
I need to draw a rectangle. To draw this rectangle, I need to know the coordinate points of each corner. All I know is x and y for the midpoints...
My counter goes to 100 at a constant speed.
Is there a way to ramp the speed of a counter?
Flash can use trigonometry values to effect speed,
but I don't know if that can change the timer class
on-the-fly.
There's a couple parts to it.
(a.) ramp the speed of a counter?
(b.) ramp in certain parts?
- have a range
- 90-100 starts ram...
Using Java on a Windows 7 PC (not sure if that matters) and calling Math.cos() on values that should return 0 (like pi/2) instead returns small values, but small values that, unless I'm misunderstanding, are much greater than 1 ulp off from zero.
Math.cos(Math.PI/2) = 6.123233995736766E-17
Math.ulp(Math.cos(Math.PI/2)) = 1.2325951644078...
Hello all you math whizzes out there!
I am struggling with a math problem I am hoping you can help me with. I have calculated an angle of direction using radians. Within OpenGL ES I move my guy by changing my point value as such:
spriteLocation.x -= playerSpeed * cosf(playerRadAngle);
spriteLocation.y -= playerSpeed * sinf(playerRad...
Hi,
I have to calculate the following:
float2 y = CONSTANT;
for (int i = 0; i < totalN; i++)
h[i] = cos(y*i);
totalN is a large number, so I would like to make this in a more efficient way. Is there any way to improve this? I suspect there is, because, after all, we know what's the result of cos(n), for n=1..N, so maybe there's so...
I have an application where I can have an image moving towards the eye.
When the image enlarged, I would like to have it resized as 635 px where initial size was 220 px. I have the image with starting position as 0 in z axis. I am wanting to calculate the distance from starting position to the resized image.
I have already calculate th...
Hi,
Im having little trouble finding a relation between the movement at centre and edge of a circle, Im doing for panning world map,my map extent is 180,89:-180,-89, my map pans by adding change(dx,dY) to its extents and not its centre. Now a situation has arrrised where I have to move the map to a specific centre, to calculate the chan...