Re: [Flashcoders] Math: Is this correct?

2009-04-11 Thread Mark Winterhalder
On Sat, Apr 11, 2009 at 5:57 PM, Jer Brand wrote: > Thanks Mark, Gonna go read with the faq's.  And you hit the nail on the > head. It looked right, but the behavior wasn't quite right There's a picture on the Wikipedia page, just look at where the axis' go and replace x, y and z with where they

Re: [Flashcoders] Math: Is this correct?

2009-04-11 Thread Jer Brand
Thanks Mark, Gonna go read with the faq's. And you hit the nail on the head. It looked right, but the behavior wasn't quite right Time to learn some vector math I suppose. Thanks again everyone. I hafta wonder if it'd be easier if I just made the day job pay for a few math courses, I work on campu

Re: [Flashcoders] Math: Is this correct?

2009-04-11 Thread Mark Winterhalder
On Fri, Apr 10, 2009 at 4:52 PM, Jer Brand wrote: > Anyone care to school me on this or confirm the math is correct? It looks correct to me. > public static function polarToCartesian3D(distance:Number, degrees1:Number, > degrees2:Number ):Point3D Ah, that's your problem right there -- your code

Re: [Flashcoders] Math: Is this correct?

2009-04-10 Thread Fumio Nonaka
One correction: _ Anthony Pace wrote: > Point (x, y) for a spin // result_x = Math.cos (a) * x Math.sin (a) * y; result_x = Math.cos (a) * x - Math.sin (a) * y; > result_y = Math.sin (a) * x + Math.cos (a) * y; > ? a in radians The rotation matrix represents these formulas: http://livedocs.ad

Re: [Flashcoders] Math: Is this correct?

2009-04-10 Thread Anthony Pace
By the way... just for the hell of it, I translated some of the Japanese, using google. http://temp.roxik.com/datas/max2007/index.html Japanese text translation taken out of the context of the slides may not mean much to you; however, if you watch the entire slide show, it should come i

Re: [Flashcoders] Math: Is this correct?

2009-04-10 Thread Jer Brand
Sorry my post wasn't very clear on what I was doing, or how I might be using the method -- was trying to keep it short and simple. I built the method based Point.polar() only tried to adapt it for 3D. I have an object performing a random walk through 3D space and I'm going to plot it's position at

Re: [Flashcoders] Math: Is this correct?

2009-04-10 Thread Anthony Pace
What is the information that you know about the point? degree for x,y? degree for x,z? degree for y,z? Is the distance you are referring to the distance from the origin? I assume it is. Here is a site that has a presentation in japanese (I think); yet, just make it past the first 12 or so poi

Re: [Flashcoders] Math: Is this correct?

2009-04-10 Thread Jer Brand
Thing is, I can download and use PV3D (and have been playing with it) and were I doing something for work, that's what I'd do. With my own personal screwing around, I'm more concerned that the math I'm using is correct not making things easy on myself. As an aside, I have the AS2 version of that bo

Re: [Flashcoders] Math: Is this correct?

2009-04-10 Thread Joel Stransky
Assuming PaperVision3D or Away3D don't do what you need, there is some great source code samples you can download from here. http://www.friendsofed.com/book.html?isbn=1590597915 Must have book btw. On Fri, Apr 10, 2009 at 10:52 AM, Jer Brand wrote: > Okay, so I'm taking my first little steps int

[Flashcoders] Math: Is this correct?

2009-04-10 Thread Jer Brand
Okay, so I'm taking my first little steps into 3d in actionscript (simulated with x/yscale for now) and needed a version of Point.polar() (thanks Jason) to play around with in 3 dimensions. I came up with the code below, but my math skills are weak enough that I'm not sure it's functioning correctl