Comments (4)
(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.
(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.
(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.
(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)
- support SVG blur effect on subdiagrams HOT 1
- A release with constraintskinds fix? HOT 3
- allow lens-4.17
- New release on Hackage to allow GHC 8.8.1 HOT 2
- Constraint synonym for any valid back end?
- Is it possible to serialize a diagram to a file and then render it with another program, another time? HOT 4
- diagrams-core introduced breaking change in a patch version HOT 5
- Relax upper bound constraints to build with base 4.15 HOT 21
- Support monoid-extras 0.6 and future versions of base (Option deprecation) HOT 2
- Doesn't work with old monoid-extras HOT 1
- Inconsistent code and doc for `atLeast`/`atMost` HOT 4
- Out of date git repo? HOT 1
- Please add support for recent versions of vector-space HOT 1
- New release for 7.10 HOT 3
- Attributes aren't type safe HOT 7
- Document (Transformable (Envelope ...)) instance HOT 2
- Problem installing diagrams with cabal... HOT 3
- Drop "xlink:" namespace for SVG 2.0 HOT 2
- Allow specifying the "target" attribute for links in SVG elements
- loosen upper bound of lens dependency for Stackage lts-11.0 compatibility
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from diagrams-core.