Re: [PD] Free rotation in GEM

2008-07-18 Thread Mathieu Bouchard
On Thu, 17 Jul 2008, PSPunch wrote: Now that I've got a grasp of what they are good for in real (or virtual) life, I enjoyed spending the last week or so studying math putting patching aside. :( So why don't you smile? I was practicing my sarcasm which I've just proved that it can use some

Re: [PD] Free rotation in GEM

2008-07-17 Thread cyrille henry
ok. i think i undersand. there is an other possibility based on the gemlist_info object that get curent transformation matrix and convert it to rotation / translation ... so, what i think is the most simple is : gemhead | rotateXYZ (for the drag rotation, should be (0

Re: [PD] Free rotation in GEM

2008-07-17 Thread PSPunch
Thanks, cyrille, I looked up some of the objects which were new to me in order to understand your method, and your example makes an awful lot of sense. I will try implementing it later today. Mean while, you can save few cpu using gemlist_matrix and GEMglMultMatrix. Can you please show

Re: [PD] Free rotation in GEM

2008-07-17 Thread IOhannes m zmoelnig
PSPunch wrote: Thanks, cyrille, I looked up some of the objects which were new to me in order to understand your method, and your example makes an awful lot of sense. I will try implementing it later today. Mean while, you can save few cpu using gemlist_matrix and

Re: [PD] Free rotation in GEM

2008-07-17 Thread PSPunch
Cyrille, With your advise, I think I've successfully implemented the algorithm I had in mind. The sad thing is, the algorithm I imagined did not exactly function in the way I wanted. i.e. 1, during one drag session, when rotating the Y axis (dragging right or left) 180 degrees and then

Re: [PD] Free rotation in GEM

2008-07-17 Thread Matthew Logan
This is rotating about local axes within the pot, which move when the pot moves, creating the strange response. The response should be based on a global set of axes, which will remain constant and provide the response you want. On 7/17/08, PSPunch [EMAIL PROTECTED] wrote: Cyrille, With

Re: [PD] Free rotation in GEM

2008-07-17 Thread cyrille henry
hello, yes, there was a small bug in your algo. it's easier for me to make a patch than to explain the problem. so, i think this is what you need. cyrille PSPunch a écrit : Cyrille, With your advise, I think I've successfully implemented the algorithm I had in mind. The sad thing is,

Re: [PD] Free rotation in GEM

2008-07-16 Thread cyrille henry
hello sorry if i misunderstand. rotateXYZ will rotate in X direction, then in Y, finally in Z. if you wish to rotate in Z, then in X, you just need 2 rotate objects: the 1st for the rotation in Z, then an other for the rotation in X. anyway, there is no matrix manipulation that i was not able to

Re: [PD] Free rotation in GEM

2008-07-16 Thread B. Bogart
Indeed, Seems to me all the matrix discussion does not get to the heart of the question. So, Pspunch, what are you really trying to do? I agree with cyrille that It's very likely the normal rotation objects will do what you want it to. If you are just wanting to rotate many times, using huge

Re: [PD] Free rotation in GEM

2008-07-16 Thread Mathieu Bouchard
On Wed, 16 Jul 2008, B. Bogart wrote: If you are just wanting to rotate many times, using huge numbers then tricks like: wrap 0 359 work well... Depends how huge they are. Pick 100032. That should give 312 degrees, supposing you use [wrap 0 360] instead of [wrap 0 359]. But as a pd

Re: [PD] Free rotation in GEM

2008-07-16 Thread B. Bogart
I suppose we'll here from David... I do certainly not quite understand what he is aiming to do. As for the heart of the question: ...I have come across concepts such as multiplying matrixs and converting a matrix to 'quarternion', 'gimbal lock'. Does not sound like he is explicitly trying to

Re: [PD] Free rotation in GEM

2008-07-16 Thread PSPunch
Hi, My primary goal is to place an object you can rotate by dragging the mouse. Basically, whenever the mouse is clicked to start drag, I want to rotate the object on the X Y axises. Up to this point is no problem, but I want the rotation to begin assuming the direction of the viewer being

Re: [PD] Free rotation in GEM

2008-07-16 Thread Mathieu Bouchard
On Thu, 17 Jul 2008, PSPunch wrote: My primary goal is to place an object you can rotate by dragging the mouse. Ok, if it's through a user interface like that, for computing just one rotation matrix, I guess you could use [accumrotate] unless it accumulates too much error. Suppose that it

Re: [PD] Free rotation in GEM

2008-07-16 Thread Mathieu Bouchard
On Wed, 16 Jul 2008, B. Bogart wrote: ...I have come across concepts such as multiplying matrixs and converting a matrix to 'quarternion', 'gimbal lock'. Does not sound like he is explicitly trying to avoid gimbal lock to me. ;) if he is using [accumrotate] he is trying to avoid gimbal lock.

Re: [PD] Free rotation in GEM

2008-07-16 Thread Mathieu Bouchard
On Wed, 16 Jul 2008, PSPunch wrote: Well, that's sort of it, if you use the name 'matrix' as taken from Jitter, or as taken from a plain linear algebra system that has been expanded to higher-order structures. I was referring to matrix as in linear algebra like you mentioned. I no nothing

Re: [PD] Free rotation in GEM

2008-07-16 Thread PSPunch
O/T Now that I've got a grasp of what they are good for in real (or virtual) life, I enjoyed spending the last week or so studying math putting patching aside. :( So why don't you smile? I was practicing my sarcasm which I've just proved that it can use some improvement. Of course

Re: [PD] Free rotation in GEM

2008-07-15 Thread Mathieu Bouchard
On Wed, 16 Jul 2008, PSPunch wrote: Trying to achieve free rotation *without* using [accumrotate], I have come across concepts such as multiplying matrixs and converting a matrix to quarternion How do you implement precise control of rotation matrixs? Is this exactly what people use GridFlow

Re: [PD] Free rotation in GEM

2008-07-15 Thread PSPunch
Hi Mathieu, I have not looked into GridFlow much, but I had the impression that its main concept was to add matrix manipulation features to Pd, all of its visual capabilities being just one of the many results of data you can manipulate with matrix. (or is the egg first?) Anyway,

Re: [PD] Free rotation in GEM

2008-07-15 Thread Mathieu Bouchard
On Wed, 16 Jul 2008, PSPunch wrote: I have not looked into GridFlow much, but I had the impression that its main concept was to add matrix manipulation features to Pd, all of its visual capabilities being just one of the many results of data you can manipulate with matrix. Well, that's sort

Re: [PD] Free rotation in GEM

2008-07-15 Thread PSPunch
Mathieu, Well, that's sort of it, if you use the name 'matrix' as taken from Jitter, or as taken from a plain linear algebra system that has been expanded to higher-order structures. I was referring to matrix as in linear algebra like you mentioned. I no nothing about features that Jitter