Code Monkey home page Code Monkey logo

Comments (2)

wynged avatar wynged commented on August 22, 2024

There is a third option.
When a decreasing angle is provided, we should flip the basis circle (e.g. -Z normal) and make the angle increasing (but preserve the user's thought about "start" "end" in the parameterization — IOW, second parameter angle corresponds to "end", always.)

So:
in Arc constructors, if the user supplies a decreasing angle range, flip the order to be increasing and flip the basis curve direction to preserve the user's intended direction

Resulting behavior should follow this diagram.
image

@andrewheumann is the real expert though, and should review the solution. :)

from elements.

DmytroMuravskyi avatar DmytroMuravskyi commented on August 22, 2024

After some tries, it's not possible to implement what is shown because Arc parameter space is not 0 => Length but tied to the circle: first one is 0 to pi/2, second is 0 to -pi/2 or indeed 0 to pi/2 if normal is reversed. But third one is pi/2 to 0 in original direction or 3pi/2 to 2pi in reverse. Flipping Z or Transform is also have side effect of flipping X or Y axis as well to preserve correct hand rule I think this is too confusing.
It's either consistent domain and simple maintenance or more flexibility but some risks.
I did a PR with support of negative domain and fixes for Arc functions that were not consistent: #998

from elements.

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.