POV-Ray : Newsgroups : povray.general : Fractional axis labeling Server Time
16 Oct 2025 12:44:10 EDT (-0400)
  Fractional axis labeling (Message 1 to 4 of 4)  
From: Bald Eagle
Subject: Fractional axis labeling
Date: 14 Oct 2025 20:50:00
Message: <web.68eeee9e3c36af741f9dae3025979125@news.povray.org>
So, as you all know, I do a lot of graphing, and at one point wanted to have a
nice way to create fractional labels for things like angle values in radians.

I also have a vintage tool addic...  hobby.
And I live in the the US and so use the Imperial system of measurement.

And I wanted to organize all of my drill bits by 64ths of an inch.

And I was bored at work, so I used the gcd function in excel to hammer out the
basics.

Then I ported to povray using the recursive gcd function I wrote.
And then fiddled, DEBUGGED, tweaked, etc.

Finally I have some functional code that will subdivide a line segment,
calculate the simplified fractional value, use "value symbols" like pi or tau,
append units, and rotate the axis labels.

It is not extensively tested or optimized in any way.

Enjoy


Post a reply to this message


Attachments:
Download 'fractionalsizes.png' (263 KB)

Preview of image 'fractionalsizes.png'
fractionalsizes.png


 

From: Bald Eagle
Subject: Re: Fractional axis labeling
Date: 14 Oct 2025 21:40:00
Message: <web.68eefa5cae81306a1f9dae3025979125@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:

> Finally I have some functional code that will subdivide a line segment,
> calculate the simplified fractional value, use "value symbols" like pi or tau,
> append units, and rotate the axis labels.


Post a reply to this message


Attachments:
Download 'fractionalsizes.pov.txt' (7 KB)

From: Kenneth
Subject: Re: Fractional axis labeling
Date: 15 Oct 2025 20:50:00
Message: <web.68f04097ae81306ae83955656e066e29@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
>
> It is not extensively tested or optimized in any way.
>
I like this; I might print it out and hang it over my own machines.

An improvement would be to align/stretch each conversion line so that the
'1.0-unit'-ends on the right will all line up vertically...so that it's clear as
to where each conversion's values match the others. When I first looked at your
graph, I assumed that this was already the case.

I'm also curious about the divide-by-11 line; the practical use of that one is a
mystery to me. What's a real-world example?


Post a reply to this message

From: Bald Eagle
Subject: Re: Fractional axis labeling
Date: 15 Oct 2025 22:05:00
Message: <web.68f05297ae81306a1f9dae3025979125@news.povray.org>
"Kenneth" <kdw### [at] gmailcom> wrote:

> I like this; I might print it out and hang it over my own machines.

Well, what I would do is use the 1/64th scale with the metric equivalents.

And now that I'm telling you to do that, I should look into going in the reverse
direction.

And Metric.

I had a conversation way back with clipka about print resolution data in the
file output.

If we can work out a way to print to scale, then you could also draw tori with
specific diameters, boxes to show the thickness of sheet metal, etc.

And like I did with my (unfinished) slide rule, you could define arrays of
special sizes - number and letter drill bits, and plot those on the scale too.

(I just scored an L. S.  Starrett No. 245 Engineer's Gauge at he flea market)

> An improvement would be to align/stretch each conversion line so that the
> '1.0-unit'-ends on the right will all line up vertically...so that it's clear as
> to where each conversion's values match the others. When I first looked at your
> graph, I assumed that this was already the case.

No, these are just arbitrarily scaled lines that get divided up.
Just take some x-value and set that as the length, and you can calculate
conversion factors for all of the Multipliers in the calls to DrawGraduatedLine
().

> I'm also curious about the divide-by-11 line; the practical use of that one is a
> mystery to me. What's a real-world example?

But you were ok with 18ths and 5ths?

To test if the algorithm works.
What if you wanted to fold a line up into an hendecagon/undecagon?
You'd need to divide it equally into 11 parts.
What if you needed to measure things for The Six-Fingered Man?
Or your amp went up to ELEVEN?

Why tau?  or pi?  or 18?  16?  32?  64?  24?  4?

It needed to be value agnostic.


- The Great Northern Walker


Post a reply to this message

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