Coder Social home page Coder Social logo

Comments (10)

xor256 avatar xor256 commented on July 20, 2024 1

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.

DanielVartanov avatar DanielVartanov commented on July 20, 2024 1

You don't need a distance between edges, only distance between vertices (bounding boxes' edges are always parallel to axes).

from ruby-geometry.

DanielVartanov avatar DanielVartanov commented on July 20, 2024 1

@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.

DanielVartanov avatar DanielVartanov commented on July 20, 2024

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.

letarg0 avatar letarg0 commented on July 20, 2024

What add offset to Polygon_2 ? Any code with Kernel Point?

from ruby-geometry.

DanielVartanov avatar DanielVartanov commented on July 20, 2024

Sorry, I didn't get your question, could you please change its formulation somehow? Thanks in advance

from ruby-geometry.

letarg0 avatar letarg0 commented on July 20, 2024

@DanielVartanov Please look at image. I have B shape, How get shape around B shape. Bigest , lighter shapes.

from ruby-geometry.

mikolaj24 avatar mikolaj24 commented on July 20, 2024

this is not a rectangle

from ruby-geometry.

DanielVartanov avatar DanielVartanov commented on July 20, 2024

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.

letarg0 avatar letarg0 commented on July 20, 2024

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 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.