GithubHelp home page GithubHelp logo

mathmo y axis bounds about apps1 HOT 3 OPEN

gmp26 avatar gmp26 commented on September 28, 2024
mathmo y axis bounds

from apps1.

Comments (3)

gmp26 avatar gmp26 commented on September 28, 2024

A few related problems here which are due to the fact that we have a pretty dumb sampling routine at the moment. Ideally we want an adaptive sampler.

For an xy plot, Mathematica does this:

  1. subdivide domain equally into (PlotPoints - 1) intervals
  2. look at each 3 successive points ABC
  3. If angle ABC > MaxBend, also plot midpoints of AB and BC
  4. Terminate the subdivision when interval length is less than 1/(PlotPoints * PlotDivision)

Probably best to use differences between Math.atan2 over AB and BC to find angle ABC. atan2 values can be cached for use in the next triple.

atan2 has a branch at dy/dx == 0, so near horizontal line segments must test for near equalty or a diff of near ±2π.

An atan2 diff near ±π indicates a singular point. A null data value should be inserted at the singularity so d3 can chop the line and so avoid drawing a vertical stroke.

Refs:

  1. Mathematica book Plot, PlotPoints, PlotDivision, MaxBend
  2. http://demonstrations.wolfram.com/AdaptivePlotting/
  3. http://scicomp.stackexchange.com/questions/2377/algorithms-for-adaptive-function-plotting

from apps1.

gmp26 avatar gmp26 commented on September 28, 2024

Need a similar algorithm for a parametric plot.

from apps1.

gmp26 avatar gmp26 commented on September 28, 2024

NB, this algorithm could generate lists of interesting plot features - like assymptotes, and turning values. These could
be indicated visually so student is prompted to label them.

from apps1.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.