The Daily Click ::. Forums ::. Klik Coding Help ::. Angle modification
 

Post Reply  Post Oekaki 
 

Posted By Message

CakeSpear



Registered
  28/01/2004
Points
  112
24th December, 2009 at 03:41:37 -

I have a 'Clock object' which can change in size altering its Radius_(value). Inside the clock i have a 'Clock arm' wich can change dirrection altering Angle_(value).

How would i be able to modify an AngleChange_(value), lets say 90 degrees, so that a change in the 'Clock arm's Angle_ would make the 'Clock arm' take an equally long jump along the 'Clock object's circumference, even if the 'Clock object's Radius_ is changed?

Image
(The center Clock would be the original one, with an AngleChange_ of 90 degrees)

 
n/a

OMC

What a goofball

Registered
  21/05/2007
Points
  3516

KlikCast Musician! Guy with a HatSomewhat CrazyARGH SignLikes TDCHas Donated, Thank You!Retired Admin
24th December, 2009 at 04:09:20 -

I'm probably misunderstanding, but I'm wanting to say that the angle is the same no matter the radius. A 90 degree change will be a 90 degree change whether the circle is 4cm wide or 40cm wide.

 

  		
  		

CakeSpear



Registered
  28/01/2004
Points
  112
24th December, 2009 at 05:22:48 -

Yes, you are correct, a 90 degree change is a 90 degree change no matter the size of the clock.
But take the picture as an example;

If the Large Clock's arm is rotated 90 degrees, then the distance 'traveled' from angle 0 to the Clock's arm, along the outline of the clock, would be far longer than the distance 'traveled' along the outline of the original Middle clock.
If the Small Clock's arm is rotated 90 degrees, then the distance 'traveled' from angle 0 to the Clock's arm, along the outline of the clock, would be shorter than the distance 'traveled' along the outline of the original Middle clock.

I have tried to illustrate the distance traveled in the picture by the blue curves next to the clocks. The point i was trying to make with these blue curves is that they are all the same length, but depending on the clocks size, the angle required to obtain that same distance along the outline, varies depending on the size of the clock. I want to know how i can modify that angle correctly to do so.

I want to keep the blue curve the same length regardless of Clock's size, so if the Clock's arm allways rotates 90 degrees, the length of the blue curve will get longer or shorter depending on the clocks size, so the Clock's arm can't always rotates 90 degrees because then the length of the blue curve wont be maintained.

Did that make it any clearer?

 
n/a

Assault Andy

Administrator
I make other people create vaporware

Registered
  29/07/2002
Points
  5686

Game of the Week WinnerVIP Member360 OwnerGOTM JUNE - 2009 - WINNER!GOTM FEB - 2010 - WINNER!	I donated an open source project
24th December, 2009 at 06:12:20 -

CakeSpear - I understand the problem, but as far as I can see you haven't really asked a specific question. Could you please state what you want us to do exactly? ie. given "these values" give you a formula to get "this value".

 
Creator of Faerie Solitaire:
http://www.create-games.com/download.asp?id=7792
Also creator of ZDay20 and Dungeon Dash.
http://www.Jigxor.com
http://twitter.com/JigxorAndy

OMC

What a goofball

Registered
  21/05/2007
Points
  3516

KlikCast Musician! Guy with a HatSomewhat CrazyARGH SignLikes TDCHas Donated, Thank You!Retired Admin
24th December, 2009 at 06:32:10 -

Angle(Pi)Radius divided by 180 gets you arc length. So rearrange the equation since the angle is the variable.

If my math isn't shot, it's Angle = 180(Length) / Pi(radius)

Since, by the problem, it seems you know the arc length and the radius, this equation should get you the right angle.

Hopefully.

It's almost 2 in the morning.

 

  		
  		

CakeSpear



Registered
  28/01/2004
Points
  112
25th December, 2009 at 23:03:42 -

Angle = 180(Length) / Pi(radius)
Exactly it! I cannot thank you enough, i could not have done this without your help, it works!
I truly envy your ability to understand and solve these kind of problems. If i could, i would donate all my point to you Clayton, yes all whooping 4 of em
Much of my thanks also goes to Coreymill who helped my progress significantly.

 
n/a

OMC

What a goofball

Registered
  21/05/2007
Points
  3516

KlikCast Musician! Guy with a HatSomewhat CrazyARGH SignLikes TDCHas Donated, Thank You!Retired Admin
25th December, 2009 at 23:09:46 -

I'm glad I could help!

 

  		
  		
   

Post Reply



 



Advertisement

Worth A Click