APS Excellence in Physics Education Award
November 2019

Education Prize Logo
Science SPORE Prize
November 2011

NSF Logo
The Open Source Physics Project is supported by NSF DUE-0442581.

Center of rotation post and replies

Return to the Center of rotation thread
Login to post to this thread

image's center of rotation
Milos Chovanec
4 Posts

Hi folks,

Does someone know how to change center of rotation of image ?

Thanks


Replies to image's center of rotation

Re: image's center of rotation -
Francisco Esquembre
237 Posts

Try placing it into a group (in the position you want) and rotating the group...

Paco



Re: Re: image's center of rotation -
Milos Chovanec
4 Posts

how can i create a group ?



Re: Re: Re: image's center of rotation -
Wolfgang
192 Posts

The Group element is in the lower left corner of the 2D Drawables palette.  Add this Element to a PlottingPanel and then add Shape Elements to the group.  You can position Elements within the Group and rotate the entire Group.

Attached File: group.jpg



Re: Re: Re: Re: image's center of rotation -
Milos Chovanec
4 Posts

Thans,

but i want to rotate it dynamicaly and its not working.
Group has a propery transform which include rotation. I pass there my variable with angle that is changing in time a its not working that way.

Any ideas ?,

Thank you very much.



Re: Re: Re: Re: Re: image's center of rotation -
Francisco Esquembre
237 Posts

See attached example. It works.

Paco

Attached File: ejs_GroupRotation.zip



Re: Re: Re: Re: Re: Re: image's center of rotation -
way better
1 Posts

try an image programme to see if is working dynamically. rotate the image's center is not an easy job for us new to image app.



OSP Projects:
Open Source Physics - EJS Modeling
Tracker
Physlet Physics
Physlet Quantum Physics
STP Book