Image Rotation
Posted: Tue Aug 22, 2017 1:54 am
Hi.
I am using a scrollbar to rotate an image with this code:
I am happy with the way it works even though the image resizes itself
as it rotates around it's image container to compensate, I can live with
that. There are several solutions out there to solve the image distortion
that are all quite complicated involving snapshots etc and it struck me
why no one has thought of writing a code that resizes the image as it
rotates to compensate as it passes through certain angles? My math isn't
up to the task but i thought I should mention the idea in case anyone
thought it had some substance.
I made an animation to demonstrate.
Currently the red square is the way rotation works in LC now. In a code
that compensates, the blue square would act like the red square but in
reverse, enlarging instead of reducing in size.
Bidge
I am using a scrollbar to rotate an image with this code:
Code: Select all
on scrollbarDrag pScrollValue
set the angle of image "i1" of stack "ImageArea" to pScrollValue
end scrollbarDrag
as it rotates around it's image container to compensate, I can live with
that. There are several solutions out there to solve the image distortion
that are all quite complicated involving snapshots etc and it struck me
why no one has thought of writing a code that resizes the image as it
rotates to compensate as it passes through certain angles? My math isn't
up to the task but i thought I should mention the idea in case anyone
thought it had some substance.
I made an animation to demonstrate.
Currently the red square is the way rotation works in LC now. In a code
that compensates, the blue square would act like the red square but in
reverse, enlarging instead of reducing in size.
Bidge