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

  • SEARCH
  • Home
  • 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 3596368
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T19:58:44+00:00 2026-05-18T19:58:44+00:00

I wish to plot an ellipse by scanline finding the values for y for

  • 0

I wish to plot an ellipse by scanline finding the values for y for each value of x.

For a plain ellipse the formula is trivial to find: y = Sqrt[b^2 – (b^2 x^2)/a^2]

But when the axes of the ellipse are rotated I’ve never been able to figure out how to compute y (and possibly the extents of x)

  • 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. Editorial Team
    Editorial Team
    2026-05-18T19:58:45+00:00Added an answer on May 18, 2026 at 7:58 pm

    In parametric form

    x[t]= a Cos[t] Cos[psi] - b Sin[t] Sin[psi]
    
    y[t]= b Cos[psi] Sin[t] + a Cos[t] Sin[psi]
    

    Where psi is the rotation angle, and a and b the semi-axes.

    The parameter t goes from 0 to 2 Pi.

    Or if you prefer in Cartesian non-parametric form:

    (a x^2+b y^2) Cos[psi]^2 + (b x^2 +a y^2) Sin[psi]^2 + (a-b) x y Sin[2 psi]==1
    

    Which yields to the two possible solutions for y[x], equivalent to the two solutions for the square root in the non-rotated case:

    y -> (-(Sqrt[2]*Sqrt[a + b - 2*a*b*x^2 + (-a + b)*Cos[2*psi]]) + 
           (-a + b)*x*Sin[2*psi]) / (2*(b*Cos[psi]^2 + a*Sin[psi]^2))
    
    y ->   (Sqrt[2]*Sqrt[a + b - 2*a*b*x^2 + (-a + b)*Cos[2*psi]] + 
           (-a + b)*x*Sin[2*psi])/ (2*(b*Cos[psi]^2 + a*Sin[psi]^2))
    

    Well, you asked for it 🙂

    Those functions give:

    enter image description here

    And the limits for x are:

    LimitX= +/- Sqrt[a + b + (-a + b)*Cos[2*psi]]/(Sqrt[2]*Sqrt[a]*Sqrt[b])
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I wish to plot an ellipse by scanline finding the values for y for
I am using plotyy to plot two vectors on different y-axes. I wish to
i wish to pass 2 value to invoke my script but i failed to
For example. Assume I do: dev.new(width=5, height=4) plot(1:20) And now I wish to do
I wish to search a database table on a nullable column. Sometimes the value
I wish to test a function that will generate lorem ipsum text, but it
I wish to plot implicit functions in MATLAB. Like x^3 + xy + y^2
I wish to set the datasource as my bound field item, but i failed
Say I have set up the following function f[a,b,c] which I wish to plot
Good day, I wish to produce a graphic using ggplot2, but not using its

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.