I'm trying to achieve an object rotation about 3 axes by incrementing values of rotation angles for axes, and displaying those axes to make next rotation direction predictable for the viewer. But after a few rotations, only rotation about Z-axis is performed in accord with displayed axis. Is there a chance it can be done simply, without ...
Can you arrange numbers 1 to 16 in a circle such that the sum of adjacent two numbers is a perfect square? If yes, how and if not, why not?
Can you write a program to solve this problem?
...
I am writing a program that creates ICC color formats. These formats specify a data type called s15Fixed16Number which has a sign bit, 15 integer bits and 16 fractional bits. IEEE 754 32-bit floats have a sign bit, 8 exponent bits and 23 fractional bits.
I need to get input from a text box, and convert them into a s15Fixed16Number. Some...
Hi,
I need to determine the X-radius & Y-radius of an ellipse give the major & minor radius and I couldn't find any way how to do it.
I have following inputs:
Center Point
Start Point
Major Radius
Minor Radius
So, My question is how to create the ellipse rect that should be passed to GDI api i.e. DrawEllipse to draw the ellipse.
T...
i have a number variable, vx, that is changing with an enter frame event. in the enter frame function i have the following code:
if (Math.abs(vx) <= 0.05);
{
trace(Math.abs(vx));
}
immediately, it's starts outputting numbers that are well above 0.05:
12.544444075226783
12.418999634474515
12.29480963812977
12.17186154174...
So I'm working on a piece of code to take positional data for a RC Plane Crop Duster and compute the total surface area transversed (without double counting any area). I cannot figure out how to calculate the area for a given period of operation.
Given the following Table Calculate the area the points cover.
x,y
1,2
1,5
4,3
6,6
3,4
3,...
What is the difference between functions in math and functions in programming?
...
My maths in this area is a bit shaky. Does anybody know how I can calculate a power such as 10^2.2 using no maths functions other than */-+ and a for loop? I don't have access to a maths library (and can't import/include it), but need to calculate these things. Hmm.. maybe I should just look how the math library does it.
...
I have an equation for a parabolic curve intersecting a specified point, in my case where the user clicked on a graph.
// this would typically be mouse coords on the graph
var _target:Point = new Point(100, 50);
public static function plot(x:Number, target:Point):Number{
return (x * x) / target.x * (target.y / target.x);
}
Thi...
I have a line that I must do calculations on for each grid square the line passes through.
I have used the Superline algorithm to get all these grid squares. This gives me an array of X,Y coordinates to check.
Now, here is where I am stuck, I need to be able to calculate the distance traveled through each of the grid squares... As in, ...
I would like to use a lightweight markup language to take notes in my college classes.
My editor of choice is gedit, and I found reStructuredText Tools for Gedit, which will run the reStructuredText processor and render the HTML in a pane in gedit. This is great, and 80% of the way there.
But for many of my classes I need to include m...
Have I missed a standard API call that removes trailing insignificant zeros from a number?
Ex.
var x = 1.234000 // to become 1.234;
var y = 1.234001; // stays 1.234001
Number.toFixed() and Number.toPrecision() are not quite what I'm looking for.
...
I'm having a problem locating anything on converting RAE to XYZ.
If I am on a WGS84 spheroid, at say position -742507, -5462738, 3196706 and I detect an object at a range of 30km, azimuth of 310, and elevation angle of 18 degrees how can I convert that to ECEF XYZ coordinates?
Thanks.
...
This isn't a homework question. All I can think of is to repeatedly divide the number by 10 (until number is less than 10) and keep a count but is there a trick for this sort fo thing?
...
How do you get row back out of n?
local n = row * cols + col
local c = n % cols
local r = ?
...
Hello,
I found this code in a web page for calculating the BMI (Body mass index), which value is: Weight/Height * Height, the result on the web page is obviously wrong so looking at the code I´ve found this operator.
I supose they wanted to calculate the square of the height but this is not happening.
The web page is: http://www.lore...
This was a contest Q:
There are N numbers a[0],a[1]..a[N - 1]. Initally all are 0. You have to perform two types of operations :
Increase the numbers between indices A and B by 1. This is represented by the command "0 A B"
Answer how many numbers between indices A and B are divisible by 3. This is represented by the command "1 A B"....
I am currently trying to construct the area covered by a device over an operating period.
The first step in this process appears to be constructing a polygon of the covered area.
Since the pattern is not a standard shape, convex hulls overstate the covered area by jumping to the largest coverage area possible.
I have found a paper th...
I have a differential drive robot, using odometery to infer its position.
I am using the standard equations:
WheelBase = 35.5cm;
WheelRadius = 5cm;
WheelCircumference = (WheelRadius * 2 * Math.PI);
WheelCircumferencePerEncoderClick = WheelCircumference / 360;
DistanceLeft = WheelCircumferencePerEncoderClick * EncoderCountLeft
Distance...
Hello all, im not sure if this is php or mysql maths question.
Ive got a table full of data, and although i can echo the individual data to the screen or echo and individual piece of data using php. I've no idea how to perform maths on the data itself.
For simplicity, say my table has 4 columns, an id column and three with my data i wa...