Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7409269
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T06:03:26+00:00 2026-05-29T06:03:26+00:00

How to generate buffer around lines or any type of geometric shapes ? Not

  • 0

How to generate buffer around lines or any type of geometric shapes?
Not interested in available packages such as Shapely etc but wish to implement.
enter image description here

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T06:03:27+00:00Added an answer on May 29, 2026 at 6:03 am

    Edited:
    This can be seen an indirect solution. If you can have your geometric shapes as image i.e., 2D matrix then you may implement (see below) simple functions such as dilation/erosion (fairly simple kernel jobs) etc to make surrounding areas around all the shapes (now pixels) on your image.

    This is so straightforward than doing hard mathematics. The following shows an experiment.
    The algorithm is simple:

    1. shift-four-direction your matrix each time one pixel and repeat until you get desired
      depth for the buffer.
    2. sum resulting matrices

    That is it.

    Apparently, for fancy output you may use contour or other function to generate lines from your output.

    enter image description here

    Update:
    Note that as mentioned this idea is so simple and actually is based on matrix demonstration of polygon, line or whatever is in the question. That is the resolution is defined by the dimensions of the representing matrix. One advantage is however it works with any complexity of the input.

    The corners are seen to be descretized form of circle.

    enter image description here

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a buffer in class 'bufferClass' that will generate a signal to tell
Hello I use malloc() to generate a buffer like this where buffer is a
I have a ByteBuffer called buffer. I want to generate a new buffer that
I'm trying to send messages generated by Google Protocol Buffer code via a simple
I generate a XMLDocument based on a dataset by binding the dataset to the
We generate pdf files with data regarding monthly financial balance of tens of thousands
I generate csv files with fputcsv and it works just fine, but when I
I generate a figure in MATLAB with large amount of elements (100000+) and want
I generate a dynamic assembly with CSharpCodeProvider, from a C# source saved into a
I generate some code using CXF from a WSDL-file. When compiling the code with

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.