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 8185763
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T01:57:42+00:00 2026-06-07T01:57:42+00:00

I am working on a math function sketcher program. Functions are being entered by

  • 0

I am working on a math function sketcher program. Functions are being entered by user and the program parses them and draws their curves. I am facing a problem that, there are some functions that have a small range interval, such as sin(x), cos(x) which have only [-1 : 1] interval. In contrast, some other functions have a very large interval, such as e^x, so they grow up very fast. I am using X-axis values to evaluate in function to produce Y-access values. The X-axis values are usually fixed from -40 to 40. However, I cannot depend on fixed values for Y-access set like X-access, since some functions have a very large Y values and some other have a very small values.

I have tried to zoom the curve with multiplication\division approach, and it worked fine with common functions. For example, sin(x) is being zoomed by sin(x) * 3. However, I have found out that some functions don’t zoom up when multiplied by a factor, but rather, the function itself changes. An example is f(x) = sin(log(cosh(sec(-x)))).

I want to find a way to zoom the function curves out\in, so that I can adjust Y-access maximum, minimum and incremental step values of them, and ofcourse, zoom the curve such that it reaches the maximum\minmum Y-values. Any math\programming idea will do. Thanks

Uses: System.Drawing.Graphics.DrawCurve(Pen pen, PointF[] curve)

  • 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-06-07T01:57:44+00:00Added an answer on June 7, 2026 at 1:57 am

    Transformation matrix works fine for me. You could try it and see:

    // Zoom transformation on the Graphics object
    float zoomFactor = 1.5f;
    Matrix mat = new Matrix();
    mat.Scale(zoomFactor, zoomFactor, MatrixOrder.Append); //zoom to 150%
    myGraphics.Transform = mat;
    // Now draw your points...
    

    Note:

    I strongly believe this kind of operations (zoom in and out) should be performed on the view, not the model. The zoom operations should be performed on the graphics object or as some others call it, the screen. Changing the method you are rendering in my mind is not clean as you are changing the model, hence drawing a different mathematical function.

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

Sidebar

Related Questions

Here's what I have working: 3 textfields that are cloned with a math function
I am working on a C math library, and it is using macros do
Working with an undisclosed API, I found a function that can set the number
I am working on a math library for my DirectX 3D engine in C#.
I have a simple function to do simple math operations. If I call this
im trying to complete this function, it seems to be working great except for
I'm very confused, with greasemonkey setTimeout just isn't working, it never calls the function,
I am working on a math expression parser using regular expressions and I am
I'm working on a Function that will do a POW long handed. It's an
I'm working on a C++ project. I had a class with its function, then

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.