POV-Ray : Newsgroups : povray.binaries.images : Fat triangles : Re: Fat triangles Server Time
1 May 2024 22:10:58 EDT (-0400)
  Re: Fat triangles  
From: JimT
Date: 31 May 2018 11:45:00
Message: <web.5b101737532d7f86be7517870@news.povray.org>
"lelama" <nomail@nomail> wrote:
> "JimT" <nomail@nomail> wrote:
> > "lelama" <nomail@nomail> wrote:
> >
> > Sorry, I've just got a new pair of glasses and misread your name. Maybe I should
> > go back to the optician.
>
> No problem at all ;)
>
> A question about your computations.
> I remember that the hard part for me was to compute the formulas for the 6
> points of tangency. Found very complicated formulas on the web although there is
> a simple one after a moment of thougt. I have forgotten the formula. Have you a
> simple method to compute the six points  and/or remember the formula ?
>
Not simple.

I looked at it from the standpoint of a pair of round cones, and there are
possibilities that the fat triangle degenerates into a single round cone, so
lots of #if statements.

I'll look at it again to see if I can simplify using the tangent plane to three
spheres idea. Either way, I'll post the code, as I said, real soon now.

> An other thing that I had in mind was the possibility to draw arbitrary convex
> hulls with rounded corners. Given a set of points with a radius at each point or
> a set of planes with a radius at each vertex, one can draw the convex set with
> rounded triangles. Although the code is not immediate, this would allow the
> construction of many rounded objects.
>
This is a good idea.

I have done a tetrahedron.

Passing an array of vertex vectors, an array of radii and an array of vertex
vector indices, like a mesh2, will allow a general rounded "convex hull" (which
actually might not be convex) and would be easy to do. I'll try tonight. I'll
aim for a rounded icosahedron with one face missing.

The hob-nailed boot way would be just a loop over faces, producing a fat
triangle for each face. This would include vertex spheres several times, edge
cones twice and both triangular faces for each fat triangle. This is all I did
for the tetrahedron. Including both triangular faces is probably a good idea to
allow for non-closed meshes, but generating a list of unique edges shouldn't be
too hard.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.