Windows bugs

23 views
Skip to first unread message

Wagyx Xygaw

unread,
Apr 2, 2023, 5:51:17 AM4/2/23
to antiprism
Hey there
I have started playing with Antiprism 0.30 on my Windows10 by running many of the examples in the doc.

Some commands will fail, sometimes it is just antiview that quits.
Here is an example:
antiview std_re
produces this scrambled shape.
Should I use cygwin, WSL, a VM or my old Ubuntu 18.04 dual boot instead ?

antiview std_re.PNG

Adrian Rossiter

unread,
Apr 2, 2023, 6:37:57 AM4/2/23
to antiprism
Hi Wagyx

On Sun, 2 Apr 2023, Wagyx Xygaw wrote:
> Some commands will fail, sometimes it is just antiview that quits.
> Here is an example:
> antiview std_re
> produces this scrambled shape.
> Should I use cygwin, WSL, a VM or my old Ubuntu 18.04 dual boot instead ?

All example commands in the program documentation, and all commands in
the examples album on the website, should succeed wherever the programs
are run.

One of the difficulties of this is to ensure that, as far as possible,
models are the same on different systems and between releases. In
particular, the vertex and face numbering should be the same. Some extra
work was recently done towards this, and this has led to std_re having
incorrect faces

antiview std_re

This will be reviewed and fixed.

Please report any example commands that fail, and either the documentation
or the program will be fixed.

Thanks

Adrian.
--
Adrian Rossiter
adr...@antiprism.com
http://antiprism.com/adrian

Wagyx Xygaw

unread,
Apr 2, 2023, 6:47:05 AM4/2/23
to antiprism
Would you have a batch file with all the commands in the documentation that I could run on my computer ?

These produce errors:
off_color -f P icosahedron | kcycle -i - -n 8 -a 90 0,1,10,11 | antiview -v 0.1
antiview: error: line 3: vertex coords: 'not' not a number

symmetro -s 5:2 -a 2e | antiview -v 0.03
symmetro: error: option a: rotation value: maths expression: Unexpected token "2e" found at position 0.
antiview: error: assuming file is list of coordinates: no coordinates found

conway w^2D | off_color_radial | antiview -x ve
conway: error: unexpected number value specified: '2' at position 2
off_color_radial: error: assuming file is list of coordinates: no coordinates found
antiview: error: assuming file is list of coordinates: no coordinates found

These make antiview stops abruptly:
symmetro -k o,1,1,0,e | antiview
symmetro -t O[3,3],1,1 | antiview
zono ico | antiview

This displays wrongly:
unitile2d -s m -w 29 -l 2 | off_color -f P -m map_darkblue:white | leonardo -m -w 0.15 | antiview -v 0.02

Adrian Rossiter

unread,
Apr 2, 2023, 10:07:39 AM4/2/23
to antiprism
Hi Wagyx

On Sun, 2 Apr 2023, Wagyx Xygaw wrote:
> Would you have a batch file with all the commands in the documentation
> that I could run on my computer ?

No, but I can probably extract them.

>
> These produce errors:
> off_color -f P icosahedron | kcycle -i - -n 8 -a 90 0,1,10,11 | antiview -v
> 0.1
> antiview: error: line 3: vertex coords: 'not' not a number

This also relates to a change of vertex numbering. A replcement command
could be

off_color -f P icosahedron | kcycle -i - -n 8 -a -90 4,9,10,11 | antiview -v 0.1

When commands produce models that cannot be constructed then vertex
coordinates may be written as "not set", which causes the next command
to fail, but allows the output to be viewed as text to review the
problem vertices.


> symmetro -s 5:2 -a 2e | antiview -v 0.03
> symmetro: error: option a: rotation value: maths expression: Unexpected
> token "2e" found at position 0.
> antiview: error: assuming file is list of coordinates: no coordinates found

This is a bug (Roger, in base/symmetro.cc line 763, the Split class
makes a copy of optarg, and so modifying optarg won't change parts[i])


> conway w^2D | off_color_radial | antiview -x ve
> conway: error: unexpected number value specified: '2' at position 2
> off_color_radial: error: assuming file is list of coordinates: no
> coordinates found
> antiview: error: assuming file is list of coordinates: no coordinates found

This command seems to be affected by the Windows shell considering ^ as
a special character. The following works

conway "w^2D" | off_color_radial | antiview -x ve


> These make antiview stops abruptly:
> symmetro -k o,1,1,0,e | antiview
> symmetro -t O[3,3],1,1 | antiview
> zono ico | antiview

These all work for me, on Windows and Ubuntu. Is anything printed to the
terminal screen?


> This displays wrongly:
> unitile2d -s m -w 29 -l 2 | off_color -f P -m map_darkblue:white | leonardo
> -m -w 0.15 | antiview -v 0.02
> Le dimanche 2 avril 2023 à 12:37:57 UTC+2, adr...@antiprism.com a écrit :

The base model doesn't join correctly any more

unitile2d -s m -w 30 -l 2 | antiview

I'll look at that.

Thanks for the report!

Roger Kaufman

unread,
Apr 2, 2023, 1:42:23 PM4/2/23
to anti...@googlegroups.com
Hi Adrian,


One of the difficulties of this is to ensure that, as far as possible,
models are the same on different systems and between releases. In particular, the vertex and face numbering should be the same. Some extra
work was recently done towards this, and this has led to std_re having
incorrect faces

   antiview std_re

It is when std_ is added to rt, rd, or re. I added in the permanent face numbers for plain rt, rd, re, but I see that when it is standard they are different.

I have an older version of antiprism that has the right face constructions for std_ versions and I can fix this.


On 4/2/2023 10:07 AM, Adrian Rossiter wrote:

symmetro -s 5:2 -a 2e | antiview -v 0.03
symmetro: error: option a: rotation value: maths expression: Unexpected
token "2e" found at position 0.
antiview: error: assuming file is list of coordinates: no coordinates found

This is a bug (Roger, in base/symmetro.cc line 763, the Split class
makes a copy of optarg, and so modifying optarg won't change parts[i])

I had to go back to find it. I used to parse it myself and then changed to the Split class. I checked the code base for any other occurrences of this but his is a unique parse. I changed the help because it said keyword and not suffix.

optional suffix: e - +1 radian, x - +1+pi radians. example: 2e

I pushed the result. I found an interesting command  in my notes using e. 5/9 doesn't rotate the triangles by exactly half but it is close. This is the same for any Dihedral (Dn) used in the command.

symmetro -t D5[5,2]1,1,3/2 -C 2 -a 0 | antiview -v 0.01
symmetro -t D5[5,2]1,1,3/2 -C 2 -a "5/9"e | antiview -v 0.01
symmetro -t D5[5,2]1,1,3/2 -C 2 -a e | antiview -v 0.01

I pushed this.


This command seems to be affected by the Windows shell considering ^ as
a special character. The following works

conway "w^2D" | off_color_radial | antiview -x ve

I should probably change the help to have the quotes? This is the only occurrence of a hat in the command on the help page.

Roger

Roger Kaufman

unread,
Apr 2, 2023, 2:19:36 PM4/2/23
to anti...@googlegroups.com
Hi Adrian,

On 4/2/2023 1:42 PM, Roger Kaufman wrote:
> It is when std_ is added to rt, rd, or re. I added in the permanent
> face numbers for plain rt, rd, re, but I see that when it is standard
> they are different.
>
> I have an older version of antiprism that has the right face
> constructions for std_ versions and I can fix this.

I fixed and pushed this. I generated the face lists from and old version
.25 which I still had around.

std_rd std_rt std_re were fixed.

Roger

Wagyx Xygaw

unread,
Apr 2, 2023, 2:24:11 PM4/2/23
to antiprism
Hi Adrian,

>> These make antiview stops abruptly:
>> symmetro -k o,1,1,0,e | antiview
>> symmetro -t O[3,3],1,1 | antiview
>> zono ico | antiview

> These all work for me, on Windows and Ubuntu. Is anything printed to the
> terminal screen?

Nothing gets printed to the terminal screen. They open fine with my online viewer though :)

Wagyx

Adrian Rossiter

unread,
Apr 2, 2023, 2:36:57 PM4/2/23
to anti...@googlegroups.com
Hi Roger

On Sun, 2 Apr 2023, Roger Kaufman wrote:
>> One of the difficulties of this is to ensure that, as far as possible,
>> models are the same on different systems and between releases. In
>> particular, the vertex and face numbering should be the same. Some extra
>> work was recently done towards this, and this has led to std_re having
>> incorrect faces
>>
>>    antiview std_re
>
> It is when std_ is added to rt, rd, or re. I added in the permanent face
> numbers for plain rt, rd, re, but I see that when it is standard they are
> different.
>
> I have an older version of antiprism that has the right face constructions
> for std_ versions and I can fix this.

I have been looking at this. It is because the zonohedron code changes the
vertex order depending on scaling the star, even minimally. Looking at
the top vertex number in the following commands, they are different for me

off_trans -S 1.00000000000 dod | zono | antiview -n v
off_trans -S 1.00000000001 dod | zono | antiview -n v

It is possible that the resource models that are made with the zonohedron
code could vary between machines. I'll try to track down the cause of
this, and see if I can improve the stability of the vertex order.

Roger Kaufman

unread,
Apr 2, 2023, 3:25:46 PM4/2/23
to anti...@googlegroups.com
Hi Adrian,

On 4/2/2023 2:36 PM, Adrian Rossiter wrote:
> I have been looking at this. It is because the zonohedron code changes
> the
> vertex order depending on scaling the star, even minimally. Looking at
> the top vertex number in the following commands, they are different
> for me
>
>    off_trans -S 1.00000000000 dod | zono | antiview -n v
>    off_trans -S 1.00000000001 dod | zono | antiview -n v
>
> It is possible that the resource models that are made with the
> zonohedron code could vary between machines. I'll try to track down
> the cause of
> this, and see if I can improve the stability of the vertex order.

It was my goof, I'm pretty sure. I probably generated the face list for
the non standard models. Maybe I ran the wrong version of off_util or
something when I displayed them and thought they were ok.

For the enneacontahedron it does have two faces lists for the two
different zono.

I just pull my repair into my Cygwin and I get correct models there too
under that compilation. If there are doubts we could always hard code
the vertices too if we had to.

Roger



Adrian Rossiter

unread,
Apr 2, 2023, 3:40:21 PM4/2/23
to antiprism
Hi Wagyx

On Sun, 2 Apr 2023, Wagyx Xygaw wrote:
>>> These make antiview stops abruptly:
...
>>> zono ico | antiview
>
>> These all work for me, on Windows and Ubuntu. Is anything printed to the
>> terminal screen?
>
> Nothing gets printed to the terminal screen. They open fine with my online
> viewer though :)

I haven't been able to reproduce this.

Did you install the binaries using the Windows installer?

What is printed on the screen for

antiview --version

What do you see when you run antiview with

zono ico > tmp.off
antiview tmp.off

If antiview does not display the model, could you attach tmp.off

Adrian
Screenshot from 2023-04-02 21-10-44.png

Wagyx Xygaw

unread,
Apr 2, 2023, 3:45:27 PM4/2/23
to anti...@googlegroups.com
Hi Adrian,

I have installed Antiprism by running antiprism-0.30_w64_install.exe

antiview --version
antiview: Antiprism 0.30 - http://www.antiprism.com

Using tmp.off as an intermediate file also makes antiview crash.
The file is enclosed.


--
Antiprism Site:  http://www.antiprism.com
---
You received this message because you are subscribed to a topic in the Google Groups "antiprism" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/antiprism/hMOr1DaV33w/unsubscribe.
To unsubscribe from this group and all its topics, send an email to antiprism+...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/antiprism/47b4fcd-e36a-f1c8-3f23-49777c86247b%40antiprism.com.
tmp.off

Adrian Rossiter

unread,
Apr 2, 2023, 5:35:08 PM4/2/23
to anti...@googlegroups.com
Hi Wagyx

On Sun, 2 Apr 2023, Wagyx Xygaw wrote:
> I have installed Antiprism by running antiprism-0.30_w64_install.exe
>
> antiview --version
> antiview: Antiprism 0.30 - http://www.antiprism.com
>
> Using tmp.off as an intermediate file also makes antiview crash.
> The file is enclosed.

Thanks. Your attached tmp.off file displays fine for me.

Just to confirm, the following command that you previously posted
displays in antiview (the model itself has some incorrect faces)

unitile2d -s m -w 29 -l 2 | off_color -f P -m map_darkblue:white | leonardo -m -w 0.15 | antiview -v 0.02

Then if you run

zono dod | antiview

The viewer crashes (does it pop up and close?), with nothing written to
the terminal screen that says it has crashed, and no error message?

I am testing on Windows 10 (in a virtual machine) with the same Antiprism
install, and the commands work for me. I am not sure why some "file" input
(i.e. piped input, or reading a real file) works with antiview for you
when other file input does not.

Adrian.

Wagyx Xygaw

unread,
Apr 2, 2023, 5:47:55 PM4/2/23
to anti...@googlegroups.com
These two commands works fine.
"zono dod | antiview" works but "zono ico | antiview" does not.
I have been playing with antiprism and antiview all day.
For some inexplicable reason, antiview fails on a very few specific models.
When it crashes, it display the model first, the window is immediately frozen and closes after 2 or 3 seconds.

Edit: I have tested a few variations:
zono ico | antiview -> crashes
zono ico | antiview -v 0.01 -> works
zono ico | antiview -v 0.0 -> works

This is becoming very weird indeed.


--
Antiprism Site:  http://www.antiprism.com
---
You received this message because you are subscribed to a topic in the Google Groups "antiprism" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/antiprism/hMOr1DaV33w/unsubscribe.
To unsubscribe from this group and all its topics, send an email to antiprism+...@googlegroups.com.

Roger Kaufman

unread,
Apr 2, 2023, 8:04:12 PM4/2/23
to anti...@googlegroups.com
Hi Adrian,

On 4/2/2023 2:36 PM, Adrian Rossiter wrote:
> I have been looking at this. It is because the zonohedron code changes
> the
> vertex order depending on scaling the star, even minimally. Looking at
> the top vertex number in the following commands, they are different
> for me
>
>    off_trans -S 1.00000000000 dod | zono | antiview -n v
>    off_trans -S 1.00000000001 dod | zono | antiview -n v
>
> It is possible that the resource models that are made with the
> zonohedron code could vary between machines. I'll try to track down
> the cause of
> this, and see if I can improve the stability of the vertex order.

I would have suggested doing a sort_merge "s" that sorts the elements
mathematically, then doing an orient.

The problem of course is that it will change all faces ordering for
zono. Redoing the face ordering in the code is easy with my utility.
Come to think of it, if you did it like this we wouldn't need face
ordering  for zono related items in the library because they'd be
constantly the same.

Roger

Adrian Rossiter

unread,
Apr 3, 2023, 12:52:07 AM4/3/23
to anti...@googlegroups.com
Hi Wagyx

On Sun, 2 Apr 2023, Wagyx Xygaw wrote:
> "zono dod | antiview" works but "zono ico | antiview" does not.
> I have been playing with antiprism and antiview all day.
> For some inexplicable reason, antiview fails on a very few specific models.
> When it crashes, it display the model first, the window is immediately
> frozen and closes after 2 or 3 seconds.
>
> Edit: I have tested a few variations:
> zono ico | antiview -> crashes
> zono ico | antiview -v 0.01 -> works
> zono ico | antiview -v 0.0 -> works
>
> This is becoming very weird indeed.

Thanks. I suspect some sort of issue relating to the Windows installer
build, that is triggered on your system for some reason with some models
(OpenGL scenes), rather than a coding error within Antiprism.

Reviewing the external components that I build against/distribute for
the Windows installer, I see they are from 2016. There may have been bugs
fixed in the Freeglut library, which is responsible for setting up the
OpenGL window, since then. There may also be a mismatch between the
compiler related DLLs that I distribute and the compiler I used to build
the binaries in the installer. These are both potential sources of issues.

I will update the Windows build, which is a good idea anyway, and make a
new installer package, to see if this fixes the issue on your system.

Adrian Rossiter

unread,
Apr 3, 2023, 1:56:52 AM4/3/23
to anti...@googlegroups.com
Hi Roger

On Sun, 2 Apr 2023, Roger Kaufman wrote:
That is a reasonable solution for the resource models. For the zonohedron
code it would be better if the vertex numbers were combinatorially linked
to the star that generated them, i.e. changing the order of the vectors
in the star would change the vertex numbering in the final model, but
scaling them would not.

I don't think this issue affects the following idea, but if zono took
a second star option, then it could make a convex zonohedron with the
first star, then repeat the construction with the second star, allowing
a transformation of the zonohedron faces into non-convex zonohedra.
This is the general case of -P with polygon winding, but working for
all zonohedra, not just polar zonohedra. It might not be difficult to
implement, if I am going through the zonohedron code anyway!

This is a polar zonohedron example

zono -P 5 | antiview
zono -P 5/2 | antiview

The following shows the transformation of the zonohedron of five vectors
to points equally spaced on a circle, as the angle between each point
is increased until the points return to their original positions.

https://antiprism.com/misc/pol_zono_5.gif

All that is happening is that the generation of the base model, which
enforces convexity, is being repeated using the new vectors, leading
to a combinatorially equivalent polyhedron but with different vertex
positions.

Roger Kaufman

unread,
Apr 3, 2023, 6:55:41 AM4/3/23
to anti...@googlegroups.com
Hi Adrian,

On 4/2/2023 1:42 PM, Roger Kaufman wrote:

It should be this in the help (no plus signs)

optional suffix: e - 1 radian, x - 1+pi radians. example: 2e

e is just a convenience for radians so quotes are not needed.

I also had fix this because it was misinterpreting 'rad()'. These are
equivalent

symmetro -s 5:2 -a 2e | antiview -v 0.03

symmetro -s 5:2 -a 'rad(2)' | antiview -v 0.03

Hmmm....

I need to review this again today. I think the interpreter should be
doing the angle conversions  for rad(x) instead of the program.

Roger


Adrian Rossiter

unread,
Apr 3, 2023, 7:12:44 AM4/3/23
to anti...@googlegroups.com
Hi Roger
The numeric arguments with e and x aren't radians, the unit is half
the (axial) angle of an edge of the polygon.

Here is an older message on option -r

https://groups.google.com/g/antiprism/c/sGP1EzUodsI/m/23qcrKnSMDUJ

Adrian Rossiter

unread,
Apr 3, 2023, 7:15:58 AM4/3/23
to anti...@googlegroups.com
On Mon, 3 Apr 2023, Adrian Rossiter wrote:
> Here is an older message on option -r

... option -a

Adrian Rossiter

unread,
Apr 3, 2023, 7:33:06 AM4/3/23
to anti...@googlegroups.com
Hi Wagyx

On Mon, 3 Apr 2023, Adrian Rossiter wrote:
If you have time to check, here is an updated installer

http://antiprism.com/misc/antiprism-0.30.99_w64_install.exe

It is the current Antiprism git version, built against the latest Freeglut
and bundling the compiler related DLLs from the version of MinGW used
to build everything.

If you choose a different install directory name duing the installation
then it can co-exist with the 0.30 version you currently have installed.

Roger Kaufman

unread,
Apr 3, 2023, 2:06:52 PM4/3/23
to anti...@googlegroups.com
Hi Adrian,

On 4/3/2023 7:12 AM, Adrian Rossiter wrote:
> The numeric arguments with e and x aren't radians, the unit is half
> the (axial) angle of an edge of the polygon.
>
> Here is an older message on option -r
>
> https://groups.google.com/g/antiprism/c/sGP1EzUodsI/m/23qcrKnSMDUJ

I checked the program and it is doing it like Twister.py (which
currently throws an error on gcd but I can't see why). If this is fixed
I can compare commands. I remember doing this back then and I thought it
was giving equivalent results.

twister.py I[5,3] 1 2 -a 0.5e
...
twister.py: error: multiplier0: module 'fractions' has no attribute 'gcd'


I will make the help for e and x similar to Twister.py.


The problem is that I'm managing both radians and degrees together in
the program. It depends on where the angle is converted to radians for
the formulas. I am trying to straighten this out. I can't even follow it.

Roger



Wagyx Xygaw

unread,
Apr 3, 2023, 5:06:37 PM4/3/23
to anti...@googlegroups.com
> The problem is that I'm managing both radians and degrees together in
> the program. It depends on where the angle is converted to radians for
> the formulas. I am trying to straighten this out. I can't even follow it.

Hahahaha, happens to me more often that I would like to.
You should go for normalized angular measures where 1 unit = 2pi rad. 😆

--
Antiprism Site:  http://www.antiprism.com
---
You received this message because you are subscribed to a topic in the Google Groups "antiprism" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/antiprism/hMOr1DaV33w/unsubscribe.
To unsubscribe from this group and all its topics, send an email to antiprism+...@googlegroups.com.

Wagyx Xygaw

unread,
Apr 3, 2023, 5:35:12 PM4/3/23
to antiprism
Hi Adrian,

I have installed the new version. here are the results.
antiview std_re
-> It displays fine !


off_color -f P icosahedron | kcycle -i - -n 8 -a 90 0,1,10,11 | antiview -v 0.1
antiview: error: line 3: vertex coords: 'not' not a number
-> still fails


symmetro -s 5:2 -a 2e | antiview -v 0.03
symmetro: warning: option -C: star polygons detected so convex hull is supressed
-> works


conway "w^2D" | off_color_radial | antiview -x ve
off_color_radial: warning: maximum ridges formed is 5
off_color_radial: warning: default map used is rng5
-> works

symmetro -k o,1,1,0,e | antiview
-> works


symmetro -t O[3,3],1,1 | antiview
-> works

zono ico | antiview
-> stops after 2-3 seconds like before


unitile2d -s m -w 29 -l 2 | off_color -f P -m map_darkblue:white | leonardo -m -w 0.15 | antiview -v 0.02
-> displays fine

Roger Kaufman

unread,
Apr 3, 2023, 6:04:01 PM4/3/23
to anti...@googlegroups.com
Hi Wagyx,


On 4/3/2023 5:35 PM, Wagyx Xygaw wrote:
off_color -f P icosahedron | kcycle -i - -n 8 -a 90 0,1,10,11 | antiview -v 0.1
antiview: error: line 3: vertex coords: 'not' not a number
-> still fails

I think Adrian said to change it to this, which works.


 off_color -f P icosahedron | kcycle -i - -n 8 -a -90 4,9,10,11 | antiview -v 0.1

I for one am very grateful for your testing! When we test our own code we always miss things.

Roger

Adrian Rossiter

unread,
Apr 4, 2023, 1:34:50 AM4/4/23
to anti...@googlegroups.com
Hi Roger

On Mon, 3 Apr 2023, Roger Kaufman wrote:
> I checked the program and it is doing it like Twister.py (which currently
> throws an error on gcd but I can't see why). If this is fixed I can compare
> commands. I remember doing this back then and I thought it was giving
> equivalent results.
>
> twister.py I[5,3] 1 2 -a 0.5e
> ...
> twister.py: error: multiplier0: module 'fractions' has no attribute 'gcd'

It should be math.gcd now. I even got sent a pull request for this!

https://github.com/antiprism/antiprism_python/commit/1371944b986fb40cd2a2fb972c690ccdbe14e75e

Wagyx Xygaw

unread,
Apr 4, 2023, 2:31:43 AM4/4/23
to anti...@googlegroups.com
Hi Roger,

> I think Adrian said to change it to this, which works.
> off_color -f P icosahedron | kcycle -i - -n 8 -a -90 4,9,10,11 | antiview -v 0.1
Yes sorry about that, the corrected command works.



--
Antiprism Site:  http://www.antiprism.com
---
You received this message because you are subscribed to a topic in the Google Groups "antiprism" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/antiprism/hMOr1DaV33w/unsubscribe.
To unsubscribe from this group and all its topics, send an email to antiprism+...@googlegroups.com.

Adrian Rossiter

unread,
Apr 4, 2023, 2:58:09 AM4/4/23
to antiprism
Hi Wagyx

On Mon, 3 Apr 2023, Wagyx Xygaw wrote:
> zono ico | antiview
> *-> stops after 2-3 seconds like before*

Thaks for the feedback. This was the issue I was really hoping was
fixed. I am not sure if I can change anything in Antiprism to fix
this, because it works if you just change the size of the vertex
elements slightly with 'antiview -v 0.1'. The internal calculation
of a value for -v must be good because you are seeing the model
before the crash (are you also seeing the sphere vertices and cylinder
edges before the crash?). There should be the same set of OpenGL
triangles in the model when setting -v 0.1, the only thing that is
different is their vertex coordinates.

Out of interest, if the model displays with -v 0.1, does it
still crash if the default vertex radius is specified directly?

zono ico | antiview -v 0.04755282581475768

Adrian Rossiter

unread,
Apr 4, 2023, 4:21:54 AM4/4/23
to anti...@googlegroups.com
Hi Roger

On Sun, 2 Apr 2023, Adrian Rossiter wrote:
> I have been looking at this. It is because the zonohedron code changes the
> vertex order depending on scaling the star, even minimally. Looking at
> the top vertex number in the following commands, they are different for me
>
> off_trans -S 1.00000000000 dod | zono | antiview -n v
> off_trans -S 1.00000000001 dod | zono | antiview -n v

I missed seeing the end of the function when reviewing this. It
finishes up by calling Qhull!

I could possibly add the hull after the original vertices and merge
the model to recover the original index numbers, but I won't do
this for now. Ideally the zonohedron code would generate the faces
itself.

Roger Kaufman

unread,
Apr 4, 2023, 5:21:37 AM4/4/23
to anti...@googlegroups.com
Hi Adrian,

On 4/4/2023 1:34 AM, Adrian Rossiter wrote:
> It should be math.gcd now. I even got sent a pull request for this!
>
> https://github.com/antiprism/antiprism_python/commit/1371944b986fb40cd2a2fb972c690ccdbe14e75e

Thanks. I just fixed it manually in my ./local directory for now.

Twister.py does the same thing as the program so that tests out.

I finally figured out what I did and I got into a tar pit years ago.

These are equivalent.

symmetro -s 5:2 -a 2e | antiview -v 0.03
symmetro -s 5:2 -a 72.0 | antiview -v 0.03

but then ...

 symmetro -s 5:2 -a 'rad(2)' | antiview -v 0.03

I thought the last one was a coincidence showing that (A)e was the same
as Rad(A)e. But I recently started to question this because its nonsense.

What I was doing was when it saw the string 'Rad(' it was converting
Rad(A) to degrees and then in the formula converting it back to A and
multiplying. So A didn't have anything to do with Radians (It just
converted back to A), and it just got transported as a multiplier. Good
Grief!

At least I can understand what I did now and can fix it. It doesn't have
to worry about Rad().

The reasoning for calling e a suffix in the help is because if e is used
it doesn't matter what (A) is. A is usually something like 0.5,1,2. But
if they had something complex like (formula)e, formula is interpreted as
a multiplier not an angle. You could add to the multipler but it is done
with two or more '-a' parameters.

symmetro -s 5:2 -a 2e -a 18.0 | antiview -v 0.03

This is actually quite nice (the same as -a 2.5e).

Roger

Roger Kaufman

unread,
Apr 4, 2023, 12:56:24 PM4/4/23
to anti...@googlegroups.com
Hi Adrian,

On 4/4/2023 5:21 AM, Roger Kaufman wrote:
> These are equivalent.
>
> symmetro -s 5:2 -a 2e | antiview -v 0.03
> symmetro -s 5:2 -a 72.0 | antiview -v 0.03
>
> but then ...
>
>  symmetro -s 5:2 -a 'rad(2)' | antiview -v 0.03

This is fixed. Now the equivalent command in radians would be

symmetro -s 5:2 -a 'rad(1.2566370614359)' -v | antiview -v 0.04

Roger

Adrian Rossiter

unread,
May 27, 2023, 4:48:56 PM5/27/23
to antiprism
Hi Wagyx and Roger

On Sun, 2 Apr 2023, Adrian Rossiter wrote:
> On Sun, 2 Apr 2023, Wagyx Xygaw wrote:
>> Would you have a batch file with all the commands in the documentation
>> that I could run on my computer ?
>
> No, but I can probably extract them.

I have attached a mini-program that prints and runs the example
commands from the documentation. Run from the top level directory
of the Antiprism source.

Print all the commands

./doc_cmds.py -p

Print and run all the commands (Ctrl-C in the terminal to quit early)

./doc_cmds.py

Run commands starting at command number 100 and finishing at at command
number 120

./doc_cmds.py 100 120


I have run all the commands, and fixed those with errors. I also updated
some of the commands to use internal models rather than OFF files, so the
command would run as-is.
doc_cmds.py

Adrian Rossiter

unread,
May 28, 2023, 2:00:05 AM5/28/23
to antiprism
On Sat, 27 May 2023, Adrian Rossiter wrote:
> I have attached a mini-program that prints and runs the example
> commands from the documentation. Run from the top level directory
> of the Antiprism source.

I meant to say, I used the BSD Zero Clause License for this code.

https://opensource.org/license/0bsd/
https://www.tldrlegal.com/license/bsd-0-clause-license

It says, do what you want with the code, inluding removing the license
and attribution, but you cannot hold the author liable,

It has become a well recognised and approved license, and should not hinder
the use of the code in any other project.

From now on I will use this for all short scripts and code examples.

Vortex Swirling

unread,
May 28, 2023, 1:57:58 PM5/28/23
to anti...@googlegroups.com
Hi Adrian,

Thanks. I was going to look into this. I have licensing in Webview but I'm going to change it to this. The code is really a patchwork quilt of code found on the web so it's all available anyway.

I had planned to release version 1.2 to reflect Waygx domain name change and minor changes.

Managing the help examples this way is interesting. It could run from beginning to end and look for warnings or errors (see below). My only suggestion is to be able to run it from a working directory so the files created wouldn't end up in the build directory. 

It also exemplifies one of the problems I have with python is that it won't use my antiview alias! (it has window geometry set, edge width, and background color) I ended up writing a python script get_alias to get it from bash_aliases and be able to use it. Per my comment above, an alias could be set as antiview='/dev/null' to test all the help examples.

Roger


--
Antiprism Site:  http://www.antiprism.com
---
You received this message because you are subscribed to the Google Groups "antiprism" group.
To unsubscribe from this group and stop receiving emails from it, send an email to antiprism+...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/antiprism/594b4a5-6893-3f99-c9ee-be81efc1fbe7%40antiprism.com.

Wagyx Xygaw

unread,
May 28, 2023, 2:49:33 PM5/28/23
to anti...@googlegroups.com
Hi Adrian,

I am using Antiprism 0.30.99
I have gone through most of the commands. The following ones makes antiview crash after a few seconds:
iso_delta -c k -n 5/2 -k 2 -a 3 | antiview crashes but not with antiview -v 0.1
zono ico | antiview crashes but not with antiview -v 0.1
off_util null -Av0,1,0 -Av1,0,0 -Av0,-1,0 -Ae0,1:red -Ae1,2:green | sweep_edges -n 12 -R 0,3*ANG/4,0 | antiview -t no_tri crashes but not without the -t no_tri argument
polygon -l 1.5 pyr 7 | off_color -f blue | pol_recip -C 0,0,-1 -c M -n 50000 -a | antiview crashes but not with antiview -v 0.1
polygon -l 1.5 pyr 7 | off_color -f blue | pol_recip -c e -n 50000 -a | antiview crashes but not with antiview -v 0.1

The very weird thing is that I initially had other similar failing command that I listed on a txt file but when I ran them again with no change, antiview did not crash.
I wonder if these crashes comes from some invisible character somewhere in the command string, though I don't get how that would be fixed with -v 0.1.
I tried typing the whole line and it still failed.

This command displays some edges with two colors and some with only one color from the same loop, is that the expected behaviour ?
I have added a picture.
poly_weave icosahedron | off_color -f U -e F | antiview -v 0.1 -x f

image.png


You received this message because you are subscribed to a topic in the Google Groups "antiprism" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/antiprism/hMOr1DaV33w/unsubscribe.
To unsubscribe from this group and all its topics, send an email to antiprism+...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/antiprism/CAPDxgxde3ysDdfcBtOHZeo05NXCKfe2f2pTzwQi%2BSQUPoSAKdA%40mail.gmail.com.

Adrian Rossiter

unread,
May 29, 2023, 4:52:49 AM5/29/23
to anti...@googlegroups.com
Hi Wagyx

On Sun, 28 May 2023, Wagyx Xygaw wrote:
> I have gone through most of the commands. The following ones makes antiview
> crash after a few seconds:
...
> The very weird thing is that I initially had other similar failing command
> that I listed on a txt file but when I ran them again with no change,
> antiview did not crash.

It appears that the crash, whatever the source of the bug, is related
to OpenGL (possibly FreeGlut), and could perhaps be specific to your
graphics card/driver, as a number of people use antiview on windows but
no-one has reported crashes like you are seeing.

Could you give some more information about your system. You are using
Windows 10, What graphics card and driver are you using? Is there anything
unusual about your systemen that might be relevant?

Out of interest, for an antiview command that crashes, could you attempt
the following before the crash occurs, to see if the crash is avoided
* resize the window at its corner
* maximise the window
* maximise and then unmaximise the window
* switch the focus to a different window


> This command displays some edges with two colors and some with only one
> color from the same loop, is that the expected behaviour ?
> I have added a picture.
> poly_weave icosahedron | off_color -f U -e F | antiview -v 0.1 -x f

The command makes loops that are overlapped in pairs, with the pairs
having different colours.

The edge cylinders are really prisms, with maybe 16 sides on my system
(I don't know if this is fixed for all systems), and shaded smooth. They
are rotated into place, and the "coincident" edge cylinders might be
rotated by different rotations determined by the order of the end
coordinates. The pair of edge prisms might overlap, and one of them might
dominate the displayed colour, or they might be rotated differently on the
axis, and look striped.

For example:

Edge prism coicidence, red dominates all edges

off_color pri5 -e red | off_trans -R 10,20,30 > t1.off
off_color pri5 -e yellow | off_trans -R 10,20,30 > t2.off
off_util t1.off t2.off | antiview -e 0.1 -v 0.1 -xf

Mirror the second prism in the xy-plane, geometrically reversing the
direction of the "vertical" edges, leading to a striped display of these
edge cyliders

off_color pri5 -e red | off_trans -R 10,20,30 > t1.off
off_color pri5 -e yellow | off_trans -M 0,0,1 -R 10,20,30 > t2.off
off_util t1.off t2.off | antiview -e 0.1 -v 0.1 -xf

Anyway, it is a visual artifact from trying to draw coincident elements.

Adrian Rossiter

unread,
May 29, 2023, 5:40:51 AM5/29/23
to anti...@googlegroups.com
Hi Roger

On Sun, 28 May 2023, Vortex Swirling wrote:
> It also exemplifies one of the problems I have with python is that it won't
> use my antiview alias! (it has window geometry set, edge width, and
> background color) I ended up writing a python script get_alias to get it
> from bash_aliases and be able to use it. Per my comment above, an alias
> could be set as antiview='/dev/null' to test all the help examples.

It looks like a solution to using aliases is to use subprocess.Popen
rather than os.system

https://stackoverflow.com/questions/6856119/can-i-use-an-alias-to-execute-a-program-from-a-python-script

I thought it was worth reviewing the visual output, for reasonableness.
However, some commands dump a lot of text on the screen, so I found myself
scrolling back to the previous command quite a bit, sometimes for several
pages, just to make sure it hadn't errored, and it would have been useful
to have a run-through that only printed commands that errored.

Adrian Rossiter

unread,
May 29, 2023, 6:54:06 AM5/29/23
to antiprism
Hi Roger

On Sat, 27 May 2023, Adrian Rossiter wrote:
> I have attached a mini-program that prints and runs the example
> commands from the documentation. Run from the top level directory
> of the Antiprism source.
...
> I have run all the commands, and fixed those with errors. I also updated
> some of the commands to use internal models rather than OFF files, so the
> command would run as-is.

I have run the resource model checker and checked against recent
releases and all looks good (UD75 is flagged, but this is due to
having large coordinates).

I'll make a minor release, Antiprism 0.31, soon to get out the recent
bug fixes and documentation fixes.

I'll review recent messages for any other small changes that could
reasonably be applied before a release.

Adrian.
--
Adrian Rossiter
adr...@antiprism.compine
http://antiprism.com/adrian

Roger Kaufman

unread,
May 29, 2023, 10:37:59 PM5/29/23
to anti...@googlegroups.com
Hi Adrian,

On 5/29/2023 6:54 AM, Adrian Rossiter wrote:
> I'll review recent messages for any other small changes that could
> reasonably be applied before a release.

I used to think there was an opts.info(message) function. But that
doesn't seem to be the case.

Maybe its the mandela effect :)

In off_color_radial I have two lines that say warning but they are
really just information.

conway esesC | off_color_radial | antiview -x ev
off_color_radial: warning: maximum ridges formed is 9
off_color_radial: warning: default map used is rng9

Its probably better just to change these to printf as is done for
example in canonical

conway dR500 | canonical | off_color -f S | antiview -v 0.01

I will do that. I doesn't make much sense to have a new function just
for printing information.

Roger

Roger Kaufman

unread,
May 29, 2023, 11:07:15 PM5/29/23
to anti...@googlegroups.com
Hi Adrian,

On 5/29/2023 5:40 AM, Adrian Rossiter wrote:
> It looks like a solution to using aliases is to use subprocess.Popen
> rather than os.system
>
> https://stackoverflow.com/questions/6856119/can-i-use-an-alias-to-execute-a-program-from-a-python-script

I saw this but I didn't try it!

The reason I didn't try it is that first glance it had -c. Since the
.bashrc has the shunt to stop non-interactive execution that I was
already having trouble with, I immediately dismissed it.

I should have read this closer, it would have saved me a lot of work
(however, I learned some interesting python functions trying to get the
result of 'alias' into a list and then match on a keyword)

The bash --help isn't very good here but I found this on interactive
shells which is what I wanted.

https://www.gnu.org/software/bash/manual/bash.html#Interactive-Shells

Roger

Adrian Rossiter

unread,
May 30, 2023, 12:39:33 AM5/30/23
to anti...@googlegroups.com
Hi Roger

On Mon, 29 May 2023, Roger Kaufman wrote:
> On 5/29/2023 6:54 AM, Adrian Rossiter wrote:
>> I'll review recent messages for any other small changes that could
>> reasonably be applied before a release.
>
> I used to think there was an opts.info(message) function. But that doesn't
> seem to be the case.
>
> Maybe its the mandela effect :)

You were pretty close, the function is opts.message(...) (see
base/programopts.h).

Coincidentally, I wanted this function a couple of days ago, and it is a
bit annoying that there is no version that will take the option letter
variable 'c'. I will add that in, but or now you could pass the option
letter as 'string(1, c)'.

Roger Kaufman

unread,
May 30, 2023, 12:30:17 PM5/30/23
to anti...@googlegroups.com
Hi Adrian,

On 5/30/2023 12:39 AM, Adrian Rossiter wrote:
> Coincidentally, I wanted this function a couple of days ago, and it is a
> bit annoying that there is no version that will take the option letter
> variable 'c'. I will add that in, but or now you could pass the option
> letter as 'string(1, c)'.

I changed the two lines in off_color_radial. In keeping with the format
I did the one line like this, the other line is generic.

opts.message(msg_str("default map used is %s", map_name.c_str()),"option
-m");

gives

off_color_radial: option -m: default map used is rng9

I'll watch for other places I could have used this in the future.
There's no reason to go crazy on it now.

I found this oddity in lat_util

  -h,--help this help message (run 'off_util -H help' for general help)
  --version version information
  -h        this help message

This still had the old -h line from years ago. I found it in nor other
program.

Roger


Reply all
Reply to author
Forward
0 new messages