POV-Ray : Newsgroups : povray.programming : The math of circular truetype fonts : Re: The math of circular truetype fonts Server Time
28 Jul 2024 16:28:50 EDT (-0400)
  Re: The math of circular truetype fonts  
From: Lummox JR
Date: 21 Feb 2000 14:13:14
Message: <38B18F5B.2229@aol.com>
Thorsten Froehlich wrote:
> Hmm, did you ever pay attention in your math classes? ;-)
> 
> Given that you know the total length you can use 2*pi*r (perimeter of
> a circle) and the fact that  2*pi*r*360/angle = length

Unfortunately it's not nearly that simple. If simple arc length formulas
would help me I wouldn't have needed to post.
The total length of all the adjacent chords is known, because the
individual chords are known--but the chord connecting the two endpoints
is not known, and that's the one that's needed to solve for r. (Either
that, or one of the individual angles corresponding to one of the chords
must be known.) Basically a bunch of points are spread out along a
circle of unknown radius, and the angle separating the two points on the
ends is known. (The arc length isn't known, however, because radius is
unknown.)
If this was just a matter of arc length the problem would be childishly
easy. However *chord* length involves cosines and square roots:
c=r*sqrt(2-2*cos(a)). Given two adjacent chords there is no way to find
their connecting chord without a radius; even calculating with the total
angle, which should be possible, delivers no end of mathematical
headaches. I'm still working on that one.
Reducing the problem to something simpler: Find a function C=f(c1,c2,A)
such that C is the chord connecting the endpoints of adjacent chords c1
and c2, knowing that their total central angle is A. Sounds simple, but
it gets tricky *really* fast. My problem is basically a superset of this
one, where instead of two chords the number is arbitrary; it could be
very high or something simple like 5 or 10.

To solve my problem, I need to find any one of the following:

- Any one of the angles corresponding to a given chord in the set.
- The length of the chord connecting to two endpoints.
- The arc length between the two endpoints.

With any of those I can solve for radius.

Lummox JR


Post a reply to this message

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