Giter Site home page Giter Site logo

Comments (4)

fryguybob avatar fryguybob commented on June 3, 2024

(Imported. Original comment by [email protected] on January 20, 2012, 08:22:05 PM UTC)

I don't really like envelope so much. It's an extra metaphor that doesn't convey the difference between the two things.

I'm not so familiar with the API, but the difference sounds like a boundary function gives you the exact boundary, while a bounding function gives you the smallest convex boundary.

Perhaps convexBoundary would be more descriptive and self-documenting. We could also add rectBoundary, so there would be 3 levels of bounding precision. The new boundary function can be exactBoundary or just boundary.

from diagrams-core.

fryguybob avatar fryguybob commented on June 3, 2024

(Imported. Original comment by [email protected] on January 20, 2012, 08:39:51 PM UTC)

The boundary function does give you the exact boundary (at least, it is an extensional encoding of the exact boundary). However, a "bounding function" (what I propose calling an "envelope") does NOT give you the smallest convex boundary. It is a function which tells you the minimum distance in any given direction to reach a perpendicular (hyper)plane which completely encloses the diagram on one side of it. See http://projects.haskell.org/diagrams/manual/diagrams-manual.html#bounding-functions-and-local-vector-spaces for more detail and some examples.

I don't think there IS any single name for this which would be self-documenting. That's why I propose using a name which is related but doesn't immediately suggest a particular obvious meaning. That way users will be forced to actually learn what the "envelope" is, with less wrong intuitions to get in the way and confuse them.

from diagrams-core.

fryguybob avatar fryguybob commented on June 3, 2024

(Imported. Original comment by [email protected] on January 20, 2012, 09:06:23 PM UTC)

Ah yes, you're right (of course).

What about approxBoundary, or erm, envelope :)

from diagrams-core.

fryguybob avatar fryguybob commented on June 3, 2024

(Imported. Original comment by [email protected] on February 18, 2012, 03:05:01 PM UTC)

Heads up, I just pushed some patches implementing this. Various things may break, e.g. if you used 'getBounds' or 'setBounds' or 'withBounds' anywhere, you now have to replace them with '{get,set,with}Envelope'. Working on updating the user manual now.

from diagrams-core.

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.