Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 171693
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T13:01:59+00:00 2026-05-11T13:01:59+00:00

I realize this might be more of a math problem. To draw the lines

  • 0

I realize this might be more of a math problem.

To draw the lines for my rectangles I need to solve for their corners. I have a rectangle center at (x,y) With a defined Width and Height.

To find the blue points on a non rotated rectangle on top (angle = 0) It is

UL = (x-Width/2),(y+height/2)
UR = (x+Width/2),(y+height/2)
LR = (x+Width/2),(y-height/2)
LL = (x-Width/2),(y-height/2)

How do I find the points if the angle isn’t 0?

Thanks in advance.


Update: although I have (0,0) in my picture as the center point most likely the center point won’t be at that location.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T13:01:59+00:00Added an answer on May 11, 2026 at 1:01 pm

    First transform the centre point to 0,0

    X’ = X-x

    Y’ = Y-y

    Then rotate for an angle of A

    X” = (X-x) * cos A – (Y-y) * sin A

    Y” = (Y-y) * cos A + (X-x) * sin A

    Again transform back the centre point to x,y

    X”’ = (X-x) * cos A – (Y-y) * sin A + x

    Y”’ = (Y-y) * cos A + (X-x) * sin A + y

    Hence compute for all 4 points of (X,Y) with following transformation

    X”’ = (X-x) * cos A – (Y-y) * sin A + x

    Y”’ = (Y-y) * cos A + (X-x) * sin A + y

    where x, y are the centre points of rectangle and X,Y are the corner points You have n’t defined correctly even the corner points when Angle is 0 as I have given in the comments.

    After substituting you will get

    UL  =  x + ( Width / 2 ) * cos A - ( Height / 2 ) * sin A ,  y + ( Height / 2 ) * cos A  + ( Width / 2 ) * sin A UR  =  x - ( Width / 2 ) * cos A - ( Height / 2 ) * sin A ,  y + ( Height / 2 ) * cos A  - ( Width / 2 ) * sin A BL =   x + ( Width / 2 ) * cos A + ( Height / 2 ) * sin A ,  y - ( Height / 2 ) * cos A  + ( Width / 2 ) * sin A BR  =  x - ( Width / 2 ) * cos A + ( Height / 2 ) * sin A ,  y - ( Height / 2 ) * cos A  - ( Width / 2 ) * sin A 

    I think this suits your solution.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This might be one of the more difficult questions I've asked, but I have
I realize this is more of a hardware question, but this is also very
I realize this is a basic question but I have searched online, been to
I realize that this is a question that will probably not have a single
I realize that this question might not make sense to some, but I was
I realize that this might be a duplicate question but this question is very
I realise this might be a little vague but I honestly don't know where
I realise this might be hard to explain, so let me start by using
realize this question is similar to this one. Pass URL parameters to a redirect_to
I realize this would violate convention, but I'm curious to know if you can

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.