Old 10th July 2002, 22:43   #1
greatWho
Senior Member
 
Join Date: May 2001
Location: Switzerland
Posts: 155
how can i rotate a pic in x- or y- axis?

i want to rotate a pic(render/picture) in the x- or y- axis, how can i do that?

thanx for help

GreatWho
greatWho is offline   Reply With Quote
Old 21st July 2002, 16:39   #2
Jaheckelsafar
Major Dude
 
Join Date: Feb 2002
Location: home
Posts: 1,318
Might be a bit late, but this might help. I use this in a superscope, but you should be able to convert it to a DM. Just initialize z1 at the beginning of each point. x1 and y1 are the coordinates of the point before any rotation. keep track of how far you're rotating in xy and yz.

-------------------------------

x2=cos(xy)*x1+sin(xy)*y1;
y2=-sin(xy)*x1+cos(xy)*y1;

y3=cos(yz)*y2+sin(yz)*z1;
z2=-sin(yz)*y2+cos(yz)*z1;

z=z2+1;
x=x2/z;
y=y3/z;

Stoke me a clipper. I'll be back for Christmas.

- Arnold Rimmer
Red Dwarf
Jaheckelsafar is offline   Reply With Quote
Old 22nd July 2002, 07:19   #3
Tonic
Senior Member
 
Tonic's Avatar
 
Join Date: May 2000
Location: Sofia,Bulgaria
Posts: 137
Try this DM:

Frame: t=t+.04

Pixel:x=x/((cos(t)));
y=-y/(.5*x*sin(t)-1)

Grid size must be:80x60 or if you want to rottate objects that are half of screen size you can reduce it to 80x16. Rectangulara and billinear must be ON.


Tonic
Tonic is offline   Reply With Quote
Old 22nd July 2002, 16:57   #4
dirkdeftly
Forum King
 
dirkdeftly's Avatar
 
Join Date: Jun 2001
Location: Cydonia, Mars
Posts: 2,651
Send a message via AIM to dirkdeftly
Well, Tonic, that's a good idea, but unfortunately it creates huge distortions in the picture - even when the rotation is very slight. The best bet for this kind of rotation is a 3D projection. Just use the regular rotation formula:
a2=a1*sin(theta)+b1*cos(theta);
b2=a1*cos(theta)-b1*sin(theta);
(where a1 and b1 are the original coordinates along the a and b axes, and theta is the rotation angle in radians) upon the planes perpendicular to the axes rotated. This means that a rotation around the Z axis would be upon the X/Y plane. Then, at the end...umm...actually I don't want to mislead you in this matter, so I'll turn it over to UnConeD, since he 'taught' me how to do this (even though I don't do what he said to do - i just try to figure out how to squish the stuff and it goes blah...yeah).



OR...If you're rotating around the Z axis, it's pretty simple. Just use the rotation for the Z axis, as there doesn't need to be any translation:
t=t+0.01
----------
x1=x;
x=x*sin(t)+y*cos(t);
y=y*cos(t)-x1*sin(t);
OR...You could just rotate it in polar coordinates and translate between them. The rotation is pretty simple:
t=t+0.01
----------
r=r+t;
And these are the translations:
r=atan2(x,-y);
d=sqrt(x*x+y*y)/sqrt(2);
x=sin(r)*d*sqrt(2);
y=-cos(r)*d*sqrt(2);

Glad to...uh...help

"guilt is the cause of more disauders
than history's most obscene marorders" --E. E. Cummings
dirkdeftly is offline   Reply With Quote
Old 22nd July 2002, 21:18   #5
UnConeD
Whacked Moderator
 
UnConeD's Avatar
 
Join Date: Jun 2001
Posts: 2,104
Tonic

By the way Tonic.. back in the AVS business?

UnConeD is offline   Reply With Quote
Old 23rd July 2002, 07:27   #6
Tonic
Senior Member
 
Tonic's Avatar
 
Join Date: May 2000
Location: Sofia,Bulgaria
Posts: 137
UnConeD. I never stop to be with AVS . I continue to check almost every day forums and AVS sites. But stop to create AVS. For now I do not plane to create AVS until Justin do not create NEW version of AVS with new effects and improved features for VJing and usability of AVS.

Altero: Yes I know that it may create a lot of distortions but not in all cases. Distortions can be avoided if edges of object that you want to rotate are not so close to edges of screen. Also you can tweak grid size to create better result.
I try example that you write but cannot produce such effect that "greatWho" wants, and Z rotation look so bad . I'm not keen with 3D projection, reytracing and etc. that UnConeD use so I cannot fix it to be real X,Y or Z rotation. If you or someone could. Pls write such examples.
Tonic is offline   Reply With Quote
Old 23rd July 2002, 10:59   #7
Rovastar
Moderator
 
Join Date: Jun 2001
Location: London, England
Posts: 3,632
Send a message via AIM to Rovastar
Quote:
Originally posted by Tonic
For now I do not plane to create AVS until Justin do not create NEW version of AVS with new effects and improved features for VJing and usability of AVS.
That is a shame Tonic, you do some nice stuff, as that means it will be 2004 until we see a new pack from you.

Did you know Justin has never even posted in the AVS forum. I think he has forgotten about it.

"Rules are for the guidance of wisemen and the obedience of fools"

Visuals - Morphyre www.Morphyre.com
Rovastar is offline   Reply With Quote
Old 23rd July 2002, 11:34   #8
Tonic
Senior Member
 
Tonic's Avatar
 
Join Date: May 2000
Location: Sofia,Bulgaria
Posts: 137
Quote:
Originally posted by Rovastar


That is a shame Tonic, you do some nice stuff,
That is problem. They are just nice I think my mission is completed, as I'm one of pioneers of AVS and most of all I work and made most of my AVS to populirize this plugin.

In this days there are many AVS artist that do "some nice stuff".

And after near half milion DL of my AVS Albums from WINAMP.COM I've got only tons of viruses in my mail boxes every day

Tonic
Tonic is offline   Reply With Quote
Old 23rd July 2002, 16:58   #9
greatWho
Senior Member
 
Join Date: May 2001
Location: Switzerland
Posts: 155
thanx for your solutions

Tonic: your solutoin is very easy, it looks fine,because the distortions at the edges i made two SS to cover them ;-) so it's only the picture with rotation;

Atero: your solution distorted the whole pic but i used this for any SS and they look very nice

so i show you 2 results... one is with a (bad )pic of me its only to show who made the presets
the other one is a rotating sexy Girl (maybe you would like more than the one with my pic )
the zip is too large to attach, so take it from here:
http://217.162.154.91/patrik1.zip

thanx alot

ps: are the most avs'ers from Europe?? only Atero, who is from Mars...
greatWho is offline   Reply With Quote
Old 24th July 2002, 11:46   #10
uNDefineD
Senior Member
 
uNDefineD's Avatar
 
Join Date: Jan 2002
Location: Melbourne, Australia
Posts: 297
Send a message via ICQ to uNDefineD Send a message via AIM to uNDefineD
Quote:
as I'm one of pioneers of AVS
Aren't we modest. Keep in mind I say this without having seen your work.

greatWho: I'm from Australia myself.
uNDefineD is offline   Reply With Quote
Old 24th July 2002, 13:02   #11
UnConeD
Whacked Moderator
 
UnConeD's Avatar
 
Join Date: Jun 2001
Posts: 2,104
uNDefineD: If you haven't seen tonic's work, download it now . http://tonic.deviantart.com/ should get you started. It's been a while since he released presets, but he's got some gems in there.

I think what he meant with "I'm one of the pioneers" is that he's been AVSing for a long time, from near the very beginning. Kind of like Lone.

UnConeD is offline   Reply With Quote
Old 24th July 2002, 14:39   #12
Tonic
Senior Member
 
Tonic's Avatar
 
Join Date: May 2000
Location: Sofia,Bulgaria
Posts: 137
Quote:
Originally posted by uNDefineD


Aren't we modest. Keep in mind I say this without having seen your work.

I'm as modest as I can. But if you want from me to be less modest I can. I may write you little history of my AVS life. I create AVS since v0.20a link for AVS v0.20a and this was before near 3 years if I remember well I made my first preset in November or December 1999. I release my first AVS pack in www.deskmod.com in January 2000 of course AVS in this days are not as this in this days. In this time there was still no AVS section in WINAMP.COM. So when in August 2000 I made my first AVS Album with 130 presets I submit it in WINDOW and FULLSCREEN section. Then I start to wait to see how WINAMP staff will review my firs Album and for my great surprise they opend new section called "AVS presets" and thay open it with my Album. After that I release 4 more Albums under "Tonic" nick and one under "Gazirana Voda" nick. If you want to see them go to this links.


Tonic 1st 08.2000
Gazirana Voda 04.2001
Tonic 2nd 05.2001
Tonic 3rd 07.2001
Tonic 4th 01.2002
Tonic 5th 01.2002

Average DL for ALL of them are 100'000 (less 32'000 most 171'000).
I'm still modest

PS: UnconeD is right I'm in AVS from very close to Lone beginning
Tonic is offline   Reply With Quote
Old 24th July 2002, 14:50   #13
Tonic
Senior Member
 
Tonic's Avatar
 
Join Date: May 2000
Location: Sofia,Bulgaria
Posts: 137
Re: thanx for your solutions

Quote:
Originally posted by greatWho
Tonic: your solutoin is very easy, it looks fine,because the distortions at the edges i made two SS to cover them ;-) so it's only the picture with rotation;

I think you do not fix correctly problem with distortions. And speed is very slow. I attached two examples you may use them to produce better result. In this AVS I fix problems with Distortions that Altero mentions with using Movement for reducing size of rotating object with .9 of screen size. And jumping rotation forward in the moment before distortions so there is no position where distortions can apear
Tonic is offline   Reply With Quote
Old 24th July 2002, 14:56   #14
Tonic
Senior Member
 
Tonic's Avatar
 
Join Date: May 2000
Location: Sofia,Bulgaria
Posts: 137
I forgot attachment or it do not work for me. So once again I try to attach one ZIP file with two presets
Attached Files
File Type: zip reduce_distorsion.zip (1.9 KB, 186 views)
Tonic is offline   Reply With Quote
Old 24th July 2002, 17:34   #15
Rovastar
Moderator
 
Join Date: Jun 2001
Location: London, England
Posts: 3,632
Send a message via AIM to Rovastar
Quote:
Originally posted by Tonic


Average DL for ALL of them are 100'000 (less 32'000 most 171'000).
I'm still modest
Easy with the showing off stuff.

I mean WildTangent have had many MILLIONS plug-in downloads doesn't mean they are any good.

"Rules are for the guidance of wisemen and the obedience of fools"

Visuals - Morphyre www.Morphyre.com
Rovastar is offline   Reply With Quote
Old 24th July 2002, 17:54   #16
Tonic
Senior Member
 
Tonic's Avatar
 
Join Date: May 2000
Location: Sofia,Bulgaria
Posts: 137
As I said I'm modest ... Yes DL do not mean nothing. But sometimes they helps. In all case in this days people do not DL AVS albums like they do thàt before. Where is problem ...
Tonic is offline   Reply With Quote
Old 24th July 2002, 21:29   #17
UnConeD
Whacked Moderator
 
UnConeD's Avatar
 
Join Date: Jun 2001
Posts: 2,104
Wildtangent

Hehe it just shows how easy it is to get 90% of all the male population to download programs full of spyware as long as they get to see wobbling boobs.

UnConeD is offline   Reply With Quote
Old 24th July 2002, 22:10   #18
Rovastar
Moderator
 
Join Date: Jun 2001
Location: London, England
Posts: 3,632
Send a message via AIM to Rovastar
Tip for your next pack mate:

Ms Happy instead of Mister Happy.

"Rules are for the guidance of wisemen and the obedience of fools"

Visuals - Morphyre www.Morphyre.com
Rovastar is offline   Reply With Quote
Old 29th July 2002, 00:28   #19
horse-fly
Account Closed
 
horse-fly's Avatar
 
Join Date: Apr 2001
Posts: 2,360
Tonic is a pioneer!!!!

as an avs artist myself, i admire works from tonic. The download rate does mean much... Wildtangent has to sponsor ads for downloads, and there was once this one guy (indyrod ... lol) who got a crap load of downloads just because he had friends in high places.

if you look at tonic's work and the other work that came out at the same time, you'll see a vast difference between the two. Tonic has a very conceptual (did i spell that right?) look, while others look like crap.

Tonic has create AVSociety, which brought together some of the best avs artists ever. Tonic creates trends as he releases packs (B&W, 4d life in sofia).

One can only hope to achieve the amount and quality that tonic has brought here.

NOW ON THE TOPIC OF ROTATION: to make a rotation, just use r & d, but in regular movement with NO clear each frame, use a=x;b=y;x=x+b*0.05;y=y-a*0.05. that is the closest to a rotation thing i can think of.
horse-fly is offline   Reply With Quote
Old 29th July 2002, 00:34   #20
horse-fly
Account Closed
 
horse-fly's Avatar
 
Join Date: Apr 2001
Posts: 2,360
oops...

i thought you meant r=r+0.05 rotation... lol
horse-fly is offline   Reply With Quote
Old 30th July 2002, 06:20   #21
dirkdeftly
Forum King
 
dirkdeftly's Avatar
 
Join Date: Jun 2001
Location: Cydonia, Mars
Posts: 2,651
Send a message via AIM to dirkdeftly
Horsefly: That rotation works for a z-axis rotation, and greatWho is looking for an x- or y-axis rotation (into the z-dimension). For zero distortion, you'd probably want to go with the 2-plane projection (I don't know why it didn't work for you, there must have been a typo).
I've attached the DM I'm talking about.
Attached Files
File Type: zip 2plane.zip (399 Bytes, 174 views)

"guilt is the cause of more disauders
than history's most obscene marorders" --E. E. Cummings
dirkdeftly is offline   Reply With Quote
Old 30th July 2002, 18:06   #22
horse-fly
Account Closed
 
horse-fly's Avatar
 
Join Date: Apr 2001
Posts: 2,360
yeah... i know... i goofed. I downloaded tonic's example, and that was when i figured that i screwed up... like unconed's April Fools forum (AVS 2.6) That C*NT That stupid CU*T... geez the idiotic *UNT!!!!
horse-fly is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Visualizations > AVS

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump