![]() |
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 |
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; |
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 |
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 ;) |
Tonic
By the way Tonic.. back in the AVS business? :D
|
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. |
Quote:
Did you know Justin has never even posted in the AVS forum. I think he has forgotten about it.:) |
Quote:
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 |
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... |
Quote:
greatWho: I'm from Australia myself. |
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. |
Quote:
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 |
Re: thanx for your solutions
Quote:
|
1 Attachment(s)
I forgot attachment or it do not work for me. So once again I try to attach one ZIP file with two presets :)
|
Quote:
I mean WildTangent have had many MILLIONS plug-in downloads doesn't mean they are any good.:) |
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 ...
|
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.
|
Tip for your next pack mate:
Ms Happy instead of Mister Happy. :);) |
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. |
oops...
i thought you meant r=r+0.05 rotation... lol
|
1 Attachment(s)
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. |
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!!!!
|
| All times are GMT. The time now is 22:33. |
Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.