discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

another thing I need.

JB
Jordan Brown
Fri, Feb 7, 2025 7:10 PM

On 2/7/2025 8:46 AM, Sanjeev Prabhakar via Discuss wrote:

another geometric way to solve such a problem is like this in pure
openscad:

Sure seems simpler to use the trig:

inscribed radius = circumscribed radius * cos(180/n)

On 2/7/2025 8:46 AM, Sanjeev Prabhakar via Discuss wrote: > another geometric way to solve such a problem is like this in pure > openscad: Sure seems simpler to use the trig: inscribed radius = circumscribed radius * cos(180/n)
SP
Sanjeev Prabhakar
Sat, Feb 8, 2025 1:58 AM

Sure seems simpler to use the trig:

inscribed radius = circumscribed radius * cos(180/n)

Only holds when all the sides of the polygon are of the same length.
In case not, there won't be any inscribed circle possible.
In such cases a bspline_closed curve with degree 2 will fit.

[image: Screenshot 2025-02-08 at 7.20.48 AM.png]

On Sat, 8 Feb 2025 at 00:40, Jordan Brown openscad@jordan.maileater.net
wrote:

On 2/7/2025 8:46 AM, Sanjeev Prabhakar via Discuss wrote:

another geometric way to solve such a problem is like this in pure
openscad:

Sure seems simpler to use the trig:

inscribed radius = circumscribed radius * cos(180/n)

>>Sure seems simpler to use the trig: >>inscribed radius = circumscribed radius * cos(180/n) Only holds when all the sides of the polygon are of the same length. In case not, there won't be any inscribed circle possible. In such cases a bspline_closed curve with degree 2 will fit. [image: Screenshot 2025-02-08 at 7.20.48 AM.png] On Sat, 8 Feb 2025 at 00:40, Jordan Brown <openscad@jordan.maileater.net> wrote: > On 2/7/2025 8:46 AM, Sanjeev Prabhakar via Discuss wrote: > > another geometric way to solve such a problem is like this in pure > openscad: > > Sure seems simpler to use the trig: > > inscribed radius = circumscribed radius * cos(180/n) > >
SP
Sanjeev Prabhakar
Sun, Feb 9, 2025 1:06 PM

There was an error in my calculation in the previous file shared.
This one is perfect

you can change the "n" parameter to see the effect. Both these files have
to be kept in the same folder.

On Sat, 8 Feb 2025 at 07:28, Sanjeev Prabhakar sprabhakar2006@gmail.com
wrote:

Sure seems simpler to use the trig:

inscribed radius = circumscribed radius * cos(180/n)

Only holds when all the sides of the polygon are of the same length.
In case not, there won't be any inscribed circle possible.
In such cases a bspline_closed curve with degree 2 will fit.

[image: Screenshot 2025-02-08 at 7.20.48 AM.png]

On Sat, 8 Feb 2025 at 00:40, Jordan Brown openscad@jordan.maileater.net
wrote:

On 2/7/2025 8:46 AM, Sanjeev Prabhakar via Discuss wrote:

another geometric way to solve such a problem is like this in pure
openscad:

Sure seems simpler to use the trig:

inscribed radius = circumscribed radius * cos(180/n)

There was an error in my calculation in the previous file shared. This one is perfect you can change the "n" parameter to see the effect. Both these files have to be kept in the same folder. On Sat, 8 Feb 2025 at 07:28, Sanjeev Prabhakar <sprabhakar2006@gmail.com> wrote: > >>Sure seems simpler to use the trig: > > >>inscribed radius = circumscribed radius * cos(180/n) > > Only holds when all the sides of the polygon are of the same length. > In case not, there won't be any inscribed circle possible. > In such cases a bspline_closed curve with degree 2 will fit. > > [image: Screenshot 2025-02-08 at 7.20.48 AM.png] > > On Sat, 8 Feb 2025 at 00:40, Jordan Brown <openscad@jordan.maileater.net> > wrote: > >> On 2/7/2025 8:46 AM, Sanjeev Prabhakar via Discuss wrote: >> >> another geometric way to solve such a problem is like this in pure >> openscad: >> >> Sure seems simpler to use the trig: >> >> inscribed radius = circumscribed radius * cos(180/n) >> >>
SP
Sanjeev Prabhakar
Sun, Feb 9, 2025 1:30 PM

Although this is trivial but still you can check this intersection point
calculation by hand. If this file goes through the mail

On Sun, 9 Feb 2025, 18:36 Sanjeev Prabhakar, sprabhakar2006@gmail.com
wrote:

There was an error in my calculation in the previous file shared.
This one is perfect

you can change the "n" parameter to see the effect. Both these files have
to be kept in the same folder.

On Sat, 8 Feb 2025 at 07:28, Sanjeev Prabhakar sprabhakar2006@gmail.com
wrote:

Sure seems simpler to use the trig:

inscribed radius = circumscribed radius * cos(180/n)

Only holds when all the sides of the polygon are of the same length.
In case not, there won't be any inscribed circle possible.
In such cases a bspline_closed curve with degree 2 will fit.

[image: Screenshot 2025-02-08 at 7.20.48 AM.png]

On Sat, 8 Feb 2025 at 00:40, Jordan Brown openscad@jordan.maileater.net
wrote:

On 2/7/2025 8:46 AM, Sanjeev Prabhakar via Discuss wrote:

another geometric way to solve such a problem is like this in pure
openscad:

Sure seems simpler to use the trig:

inscribed radius = circumscribed radius * cos(180/n)

Although this is trivial but still you can check this intersection point calculation by hand. If this file goes through the mail On Sun, 9 Feb 2025, 18:36 Sanjeev Prabhakar, <sprabhakar2006@gmail.com> wrote: > There was an error in my calculation in the previous file shared. > This one is perfect > > you can change the "n" parameter to see the effect. Both these files have > to be kept in the same folder. > > On Sat, 8 Feb 2025 at 07:28, Sanjeev Prabhakar <sprabhakar2006@gmail.com> > wrote: > >> >>Sure seems simpler to use the trig: >> >> >>inscribed radius = circumscribed radius * cos(180/n) >> >> Only holds when all the sides of the polygon are of the same length. >> In case not, there won't be any inscribed circle possible. >> In such cases a bspline_closed curve with degree 2 will fit. >> >> [image: Screenshot 2025-02-08 at 7.20.48 AM.png] >> >> On Sat, 8 Feb 2025 at 00:40, Jordan Brown <openscad@jordan.maileater.net> >> wrote: >> >>> On 2/7/2025 8:46 AM, Sanjeev Prabhakar via Discuss wrote: >>> >>> another geometric way to solve such a problem is like this in pure >>> openscad: >>> >>> Sure seems simpler to use the trig: >>> >>> inscribed radius = circumscribed radius * cos(180/n) >>> >>>