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.

How to generate buffer around lines or any type of geometric shapes ? Not
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
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.
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:
depth for the buffer.
That is it.
Apparently, for fancy output you may use contour or other function to generate lines from your output.
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.