"I have noticed that even those who assert that everything is predestined and that
we can change nothing about it still look both ways before they cross the street"
-Stephen Hawking
Maybe it would be easier instead to focus on gfx displays so no floats ever have to
be transmitted, but rather, only integer screen coordinates.
Say you wanted a clock face with hands you could send the coordinates of the
point you want rotated, and the angle of rotation, the coordinates of the origin,
and the chip provides the new coordinate integers.
I know there is a clock example here, but without looking I'd say a number
of points about the clock face are pre-defined.
I'll bet it cannot currently have a sweeping second hand (for example).
Probably not ...
Quaternions were developed by an Irish mathematician, and Euler Angles (pronounced Oiler Angle) were from a Swiss mathematician.
Play around with Digital Gyro's and Accelerometers, and you're sure to come across them.
They are used in rotating 3D objects too.
Last edited by Darrel Taylor; - 3rd November 2013 at 02:22.
DT
Art
As a side note is there a reason you require floats in place of Longs?
Couldn't a Long result be used as a float by determining the decimal point by division by a multiple of 10?
For larger values Darrel's lesser known N-Bit_MATH could be utilized.
Norm
Hi,
It's not the numbers that are needed, but the math,
and in particular, of interest to me, trigonometric functions
not implemented in PBP such as: sin, cos, tan, etc.
needed for calculations such as distance,bearing,foot of perpendicular,
anything to do with angles in games (ball bouncing of a wall at the inverse angle), etc.
No, because I've seen that cordic trig has been implemented with PicBASIC,
and is demonstrated by a program that can calculate distance and bearing
given a set of geo-coordinates.
I'm saying any purely PBP implementation I've seen is slow and memory consuming,
and unsuitable for anything requiring the speed for a graphics display.
The dspic at 40MIPS should really be doing the whole job,
but in reality, I'd get the job done quicker with a low end pic using PBP
when it comes to interfaces and talking to other devices,
but that could change if one became familiar with the C libraries used
for the communication. A large part of what PBP is, is a collection of
similar libraries in RISC asm.
I think it would be easiest to emulate the comms of LCDOUT/LCDIN
with 8 bit interface, so you could use LCDOUT to talk to it.
Bookmarks