Bug? Unknown command: Polyline

Thijs shared this problem 6 years ago
Solved

LP1={(0,0),(1,0)}

LP2={(2,0),(3,0),(3,1)}

LP3={(4,0),(5,0),(5,1),(4,1)}


PL1=Translate[Polyline[LP1], Vector[(1,1)]]

PL2=Translate[Polyline[LP2], Vector[(1,1)]]

PL3=Translate[Polyline[LP3], Vector[(1,1)]]

# Works without problems


Execute[Sequence["PL"+k+"=Translate[Polyline[LP"+k+"],Vector[(1,1)]]", k,1,3]]

# Doesn't work. GeoGebra Error : “Unknown command: Polyline”


Maybe I'm doing something wrong, but I think it's a bug.

For a more complex example, see CREATE button GeoGebra script in:


Hilbert curve: https://www.geogebra.org/m/PMcY6Q8j

Comments (7)

photo
1

Yes it's a bug.


Workaround: write PolyLine instead of Polyline

(but this is not compatible with GGB, when the bug is corrected)

photo
1

Thanks, fixed for next release


  1. (but this is not compatible with GGB, when the bug is corrected)

no, it's fine!

photo
1

Thank you guys, you are all amazing!!

photo
1

Please try the new version (387)

photo
1

Jesus, you guys are fast!

New CREATE button GeoGebra script works fine now.

Hilbert curve: https://www.geogebra.org/m/PMcY6Q8j

I'm using affine transformation matrices now.

The same method is presented in:

Pythagoras tree Affine: https://www.geogebra.org/m/zqFzNyC7

Hope you like it, Thanks again.

photo
1

Hello Noel,

I like to present the Hilbert curve without irrelevant ballast. (a pleasure for the eye.)

If someone is really interested in how everything is created then he or she can download. Recursive applications work faster and better after a download. GeoGebra sometimes crashes when developing heavy recursive procedures (creating too much objects or a garbage function doesn't delete everything). I use Delete and Create-Scripts when I'm searching the limits of GeoGebra. This solved Polyline bug-topic isn't the right place to start a discussing here.

My reference to affine transformation matrices was only ment to be a small gift for the technical guys who solved the Polyline-bug.

OK, my fault and maybe you're right: I'm an old-fashioned 3gl offline user.smile

photo
photo
1

It' s working with Polyline[]


Thanks

© 2023 International GeoGebra Institute