Rotating Polygons

BNig niggemann at uni-wh.de
Wed Sep 30 18:09:36 EDT 2009


Sorry, I hit the send button before writing...

you can make the revRotatePoly somewhat stable by setting a custom property
with the points of the graphic before revRotatePoly. Then whenever you
rotate you start from the original points of the graphic.

like in this

on scrollbarDrag newValue 
lock screen 
set the points of graphic "g1" to the myPoints of graphic "g1" 
revRotatePoly the name of graphic "g1", newValue 
end scrollbarDrag 

regards
Bernd

> on scrollbarddrag scrollbarDragValue
> revRotatePoly the long ID of grc "SQUIGGLE", scrollbarDragValue
> end scrollbardrag


BNig wrote:
> 
> 
> 
> Richmond Mathewson-2 wrote:
>> 
>> BNig wrote:
>>> Richmond,
>>>
>>> you might want to try to put 
>>>
>>> on scrollbarddrag scrollbarDragValue
>>> revRotatePoly the long ID of grc "SQUIGGLE", scrollbarDragValue
>>> end scrollbardrag
>>>
>>> into a scrollbar and scroll a couple of times from 0 to 360 and back.
>>>
>>> Robert is up to a stable rotate
>>>
>>> regards
>>> Bernd
>>>
>>>
>>>   
>> Presumably what you mean by "a stable rotate" is that the polygon does 
>> not get distorted
>> as it rotates.
>> 
>> This:
>> 
>> on mouseUp
>>    repeat for 360 times
>>       revRotatePoly the long ID of grc "gXXX", 1
>>    end repeat
>> end mouseUp
>> 
>> ends up making the graphic unrecognisable.
>> 
>> I tried this:
>> 
>> on mouseUp
>>    set the moveSpeed to 65000
>>    repeat for 360 times
>>       revRotatePoly the long ID of grc "gXXX", 1
>>       set the lockScreen to true
>>       set the width of grc "gXXX" to 300
>>       set the height of grc "gXXX" to 300
>>       move grc "gXXX" to 300,300
>>       set the lockScreen to false
>>    end repeat
>> end mouseUp
>> 
>> and the effect is really horrible insofar as the polygon gets badly 
>> transformed.
>>>
>>> Richmond Mathewson-2 wrote:
>>>   
>>>> I just have been reading Robert Cailliau's page:
>>>>
>>>>
>>>> Cailliau claims:
>>>>
>>>> "Unlike images, polygons cannot be directly rotated in Revolution. 
>>>> They 
>>>> have no "angle" property."
>>>>
>>>> http://www.robertcailliau.eu/Programming/Revolution/Tutorials/PolygonRotation/zPolygonRotation.html
>>>>
>>>> the second part of which is plain WRONG; one can set the ANGLE of an 
>>>> irregular polygon, it just doesn't
>>>> have any affect.
>>>>
>>>> HOWEVER, the Documentation explicitly details  revRotatePoly:
>>>>
>>>> on mouseUp
>>>>    revRotatePoly the long ID of grc "SQUIGGLE", 60
>>>> end mouseUp
>>>>
>>>> which is a lot simpler than getting misled by Cailliau's stuff about 
>>>> having to use all sorts of complicated
>>>> custom properties.
>>>>
>>>>     
>> It would make things a lot simpler if Cailliau explicitly stated what he 
>> meant by "rotate".
>> _______________________________________________
>> use-revolution mailing list
>> use-revolution at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-revolution
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Rotating-Polygons-tp25688352p25689944.html
Sent from the Revolution - User mailing list archive at Nabble.com.




More information about the use-livecode mailing list