generate images from sources in appendix

17 views
Skip to first unread message

Qian Yun

unread,
Apr 16, 2024, 6:12:41 AM4/16/24
to fricas-devel
I can now generate all images from sources listed in appendix.

Although only src/doc/ps/knot3.ps is currentlly used in chapter 7.
We can delete this 70k line ps file from repo now.
(And it's black and white, I can generate colored ps files now.)

Those pictures were in the original Jenk&Sutor book.

In attachment pics-new.pdf is my newly generated version.
Details are not tweaked yet, for example titles, axes, etc.

In attachment pics-old.pdf (see next mail) is the scanned
version from Axiom's bookvol0.pdf.

I'll upstream my changes very soon.

- Qian
pics-new.pdf

Qian Yun

unread,
Apr 16, 2024, 6:15:07 AM4/16/24
to fricas-devel
This is pics-old.pdf. (Due to 8MB size limit, it's uploaded in
this mail.)
pics-old.pdf

Waldek Hebisch

unread,
Apr 16, 2024, 10:38:10 AM4/16/24
to fricas...@googlegroups.com
On Tue, Apr 16, 2024 at 06:11:56PM +0800, Qian Yun wrote:
> I can now generate all images from sources listed in appendix.

Good.

> Although only src/doc/ps/knot3.ps is currentlly used in chapter 7.
> We can delete this 70k line ps file from repo now.
> (And it's black and white, I can generate colored ps files now.)
>
> Those pictures were in the original Jenk&Sutor book.
>
> In attachment pics-new.pdf is my newly generated version.
> Details are not tweaked yet, for example titles, axes, etc.
>
> In attachment pics-old.pdf (see next mail) is the scanned
> version from Axiom's bookvol0.pdf.

Just a silly question: have you looked why the image is so big?
Your new image is 6.7M and bigger than scanned version (4.3M).
Old knot3.ps is 77k lines giving 1.1M size. At first glance
adding color to this could double or maybe triple the size.
.pdf uses compression, compressed knot3.ps is 153k. So
I would expect .pdf of order 0.5M.

--
Waldek Hebisch

Qian Yun

unread,
Apr 16, 2024, 7:26:26 PM4/16/24
to fricas...@googlegroups.com
My new knot3.pdf is 480K. That's because my version is "smooth"
style aka made from many many dots while the trunk version
is the default "shade" style, aka made from lines.

There are a few other pics are in "smooth" style.

On average a "shade" style picture takes around 50-200KB and
a "smooth" style picture takes 200-400KB depending on the complexity
of the picture.

Also the scanned version is of low resolution, a high resolution scan
could easily take over 10MB size.

- Qian

Waldek Hebisch

unread,
Apr 16, 2024, 8:18:29 PM4/16/24
to fricas...@googlegroups.com
I admit that for me "shade" style looks better than "smooth".

--
Waldek Hebisch

Qian Yun

unread,
Apr 16, 2024, 8:27:07 PM4/16/24
to fricas...@googlegroups.com


On 4/17/24 08:18, Waldek Hebisch wrote:
>>
>> On average a "shade" style picture takes around 50-200KB and
>> a "smooth" style picture takes 200-400KB depending on the complexity
>> of the picture.
>
> I admit that for me "shade" style looks better than "smooth".
>

For knot3 I'm OK with both "shade" and "smooth". For some pics
"shade" look better and for others "smooth" look better.

Here I'm just mimicking the style from the scanned version.

Do you think we should include those pictures in
fricas-reference-book? (with styles tweaked, of course.)

- Qian

Ralf Hemmecke

unread,
Apr 17, 2024, 3:03:07 AM4/17/24
to fricas...@googlegroups.com
>> Just a silly question: have you looked why the image is so big?

Just a proposal. What about putting moderately sized smooth pictures
into the book and high resolution pics at some place in the web and make
to book only pointing to these online pictures, in particular those
probably hand-crafted pictures that appear in the middle of the
Jenks&Sutor book? We should be able to not just scan, but generate those
pictures. Unfortunately, I don't think that I have yet seen the actual
commands that produced them.

Ralf

Qian Yun

unread,
Apr 18, 2024, 9:21:23 AM4/18/24
to fricas...@googlegroups.com


On 4/16/24 22:38, Waldek Hebisch wrote:
>
> Just a silly question: have you looked why the image is so big?
> Your new image is 6.7M and bigger than scanned version (4.3M).
> Old knot3.ps is 77k lines giving 1.1M size. At first glance
> adding color to this could double or maybe triple the size.
> .pdf uses compression, compressed knot3.ps is 153k. So
> I would expect .pdf of order 0.5M.
>

Update on image size:

The 3D "smooth" style is pixel-for-pixel bitmap.
So for colored knot3 image (400x400):
ps is 2.1MB
xpm is 320KB
pdf is 208KB (converted from ps)
png is 28KB (converted from xpm)


The only difference/advantage of PS format is that it has
vector font (for x/y/z, title, etc).

So if the image have no axes and no title, just colored pixels,
we can use png format.

- Qian

Waldek Hebisch

unread,
Apr 18, 2024, 9:26:58 AM4/18/24
to fricas...@googlegroups.com
On Wed, Apr 17, 2024 at 09:03:04AM +0200, Ralf Hemmecke wrote:
> > > Just a silly question: have you looked why the image is so big?
>
> Just a proposal. What about putting moderately sized smooth pictures into
> the book and high resolution pics at some place in the web and make to book
> only pointing to these online pictures,

1) Postscript is supposed to be resolution-independent.
2) IMO book should be complete, that is include quality pictures

> in particular those probably
> hand-crafted pictures that appear in the middle of the Jenks&Sutor book?

I do not think we should "hand-craft" pictures. We are open-source
project and deception (and "hand-crafting" really is deception)
would quickly fall apart.

> We
> should be able to not just scan, but generate those pictures. Unfortunately,
> I don't think that I have yet seen the actual commands that produced them.

There section 'Programs for FriCAS Images' in FriCAS book. AFAIK
it gives the sources. And AFAIUI Qian can generte those pictures.

--
Waldek Hebisch

Waldek Hebisch

unread,
Apr 18, 2024, 10:07:17 AM4/18/24
to fricas...@googlegroups.com
OK, so it looks that for Postscript "shade" is really preferable.
Still, bitmapped color "smooth" is better than b/w or not working
at all.

Concerning FriCAS book, I do not think that we must follow old
version. Rather, we want to have good looking examples and
have samples of various formats/options, but we can use
different pictures.

There is one extra thing: it would be good to be able to generate
all documentation without X11. Currently bitmap generation works
by first drawing on X window and then grabbing from X server the
resulting bitmap. This fails without X server. Vector formats
should alow direct generation (currently even vector Postscript
depends on X for color calculations, but that should be not
too hard to eliminate).

--
Waldek Hebisch
Reply all
Reply to author
Forward
0 new messages