Everybody! This is important. In a few days, these forums will be moving over to using the totally sweet Discourse platform. To ensure this migration happens smoothly with no loss of content, these forums are currently in a read-only mode. I do apologize for the inconvenience.

There is never a good time to turn the forums off for an extended period of time, but I promise the new forums will be a billion times better. I'm pretty sure of it.

See you all on the other side in a few days, and if you have any (non-technical) questions, please e-mail me at kirupa@kirupa.com. For technical questions, try to find a tutorial that corresponds to what you are looking for and post in the comments section of that page.

Cheers,
Kirupa

Results 1 to 6 of 6

Thread: Corner Coordinates of Rotated Rectangle

  1. #1

    Corner Coordinates of Rotated Rectangle

    I bet there's an easy answer to this one:

    How do I get the x and y position of a rotated rectangle's (or an MC that contains a rectangular shape) top-right, bottom-right and bottom-left corners (not its bounding rectangle)?

    Thnx!

    E

  2. #2
    I haven't used it, but you might look into localToGlobal. That might get you what you need pretty easily.

    That or trigonometry.

  3. #3
    you can use the matrix you rotated the object with (or create one).

    you will need the original coordinates for each of the four points:
    click

  4. #4
    I think you will indeed have to get busy with your maths mate!

    Will you know the radius of your rounded corners? If so, it may not be so difficult to find the x / y of given points along the curve, if thats what you meant.

  5. #5
    I haven't used localToGlobal, but it seems like it would work. Is there a reason the two of you didn't agree with my suggestion?

  6. #6
    Quote Originally Posted by cesig View Post
    I haven't used localToGlobal, but it seems like it would work. Is there a reason the two of you didn't agree with my suggestion?
    Only because i'm an idiot and didn't read the post properly! lol! You know how it is, sneaking around forums whilst the boss isnt looking your way! Just skim read it. I thought he was on about a rounded rectangle (finding the points along the curved corner)

    Your right, localToGlobal will nail it! sorry Cesig

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Home About kirupa.com Meet the Moderators Advertise

 Link to Us

 Credits

Copyright 1999 - 2012