Comments (10)
I thing about offset outside polygon. Minimal distance between alle edges to all edges other polygon. (i change image for clarify). offset is not this same shape.
How I can count distance between 2 edges?
from ruby-geometry.
You don't need a distance between edges, only distance between vertices (bounding boxes' edges are always parallel to axes).
from ruby-geometry.
@letarg0, well, just to re-iterate, Polygon#bounding_box
seems to be a solution to your problem: since you apply this method to both polygons, you'll have just two rectangles each edge of which is parallel to one of axes, which makes the problem trivial since then
from ruby-geometry.
There is a function Polygon#bounding_box
which is the most helpful to implement a function of such distance. Please let me know if it helps.
from ruby-geometry.
What add offset to Polygon_2 ? Any code with Kernel Point?
from ruby-geometry.
Sorry, I didn't get your question, could you please change its formulation somehow? Thanks in advance
from ruby-geometry.
@DanielVartanov Please look at image. I have B shape, How get shape around B shape. Bigest , lighter shapes.
from ruby-geometry.
this is not a rectangle
from ruby-geometry.
Again, let me repeat: when you apply a method of Polygon#bounding_box
to a second polygon labeled 'B', you will have a rectangle. Please see how Polygon#bounding_box
works.
from ruby-geometry.
canYou show me a code or draw a image?
I dont know what I canthing about Yours sugestions.
from ruby-geometry.
Related Issues (6)
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 ruby-geometry.