Page 1 of 2

Tessellation

Posted: Mon Jan 16, 2023 9:49 am
by richmond62
http://www.shodor.org/interactivate/act ... essellate/

I wonder how easy this would be to implement in LiveCode.

Re: Tessellation

Posted: Mon Jan 16, 2023 9:52 am
by richmond62
Screen Shot 2023-01-16 at 10.50.34 am.png
-

While it is relatively easy to set up a polygonal graphic with these points, the thing that I have got stuck with is the tessellation.

Of course if one enters the vertices given by the web page directly one ends up with one's shape being upside down because
Bill Atkinson DROPPED the acid, rather than LIFTED it. :D
-
Screen Shot 2023-01-16 at 11.00.26 am.png
Screen Shot 2023-01-16 at 11.00.26 am.png (6.74 KiB) Viewed 5387 times
-
The second column (Length) appears to be redundant.

Re: Tessellation

Posted: Mon Jan 16, 2023 10:18 am
by richmond62

Re: Tessellation

Posted: Mon Jan 16, 2023 10:22 am
by richmond62

Re: Tessellation

Posted: Mon Jan 16, 2023 10:48 am
by richmond62
Tangential relevance, but even more fun:

https://www.geometrygames.org/Archive/

Re: Tessellation

Posted: Mon Jan 16, 2023 10:51 am
by richmond62
This:

http://www.shodor.org/interactivate/act ... essellate/

is written in Java, so anyone who can:

1. Get a look at the code (? ethical consideration here, possibly ?).

2. Convert Java into LiveCode.

could . . .

ALL I can do is try to mimic the functionality.

Re: Tessellation

Posted: Mon Jan 16, 2023 11:02 am
by richmond62
This, even if a bit more simplistic:

https://www.theedkins.co.uk/jo/tess/sqtile.htm
-
Screen Shot 2023-01-16 at 12.01.45 pm.png
-
should be easily replicable in LiveCode.

Re: Tessellation

Posted: Mon Jan 16, 2023 12:45 pm
by richmond62
I wonder:
-
Screen Shot 2023-01-16 at 1.43.11 pm.png

Re: Tessellation

Posted: Mon Jan 16, 2023 2:59 pm
by richmond62
Meanwhile, between beating English into tiny brains:
-
Screen Shot 2023-01-16 at 3.57.20 pm.png

Re: Tessellation

Posted: Tue Jan 17, 2023 10:29 pm
by richmond62
Screenshot_2023-01-17_23-23-31.png
-
Nearly there.

Re: Tessellation

Posted: Wed Jan 18, 2023 11:20 am
by richmond62
As promised:
-
Screen Shot 2023-01-18 at 12.14.54 pm.png
-

Re: Tessellation

Posted: Thu Jan 19, 2023 12:03 pm
by richmond62
Well, after my fairly goofy side-trip, I'd like to return to this:

http://www.shodor.org/interactivate/act ... essellate/

and note that when one chooses Edit Edges, on clicking one of the lines of the vector shape it is cut into 2 lines, as is the line (vertex ?)
opposite it:
-
Screen Shot 2023-01-19 at 1.07.40 pm.png
-
Screen Shot 2023-01-19 at 1.07.58 pm.png
-
Of course what this does, regardless of how one mucks around with the vector shape is ensures that the area it borders
never changes size.

Re: Tessellation

Posted: Thu Jan 19, 2023 12:21 pm
by richmond62
Screen Shot 2023-01-19 at 1.15.38 pm.png
Screen Shot 2023-01-19 at 1.15.38 pm.png (5.5 KiB) Viewed 4873 times
-
And here's a happy little polygon graphic

[No, that's NOT a Regular Polygon, that one of those Polygon Graphics that are a complete and utter pain in the bum
because. when they are created on a card they are invisible (which they used not to be) and one has to piss around
with the property inspector to start adding points for vertices to them.]

In fact, I would prefer just to call is a GONE graphic. :D

Anyway, post-rant (no, didn't smoke a cigarette) . . .

How the Flying Fudge, on clicking on a vertex would one code things to insert a new points line into the points list
inwith the property inspector of the polygon grPhic so as to create a new line?

Oh, and while I'm here, and while I'm in a relatively obtuse frame of mind, perhaps I should point out that at work I am constrained to
LC 8.1.10 on MacOS 10.7.5. 8)

No that I have noticed anything that has changed between 8.1.10 & 9.6.* in terms of polygon graphics.
-
guinnes.jpeg
guinnes.jpeg (9.73 KiB) Viewed 4871 times

Re: Tessellation

Posted: Thu Jan 19, 2023 1:44 pm
by bn
How the Flying Fudge, on clicking on a vertex would one code things to insert a new points line into the points list
inwith the property inspector of the polygon grpahic so as to create a new line?
If I understand correctly what you are trying to do then:

If you have a polygon graphic select it and choose "Reshape Graphic" from the Object Menu.

If you click on a vertex while the option key is down you create a new vertex which you can drag to where you want.

If however you want to make lines of a polygon graphic to be split as to appear unconnected then insert an empty line in the points list.



Kind regards
Bernd

Re: Tessellation

Posted: Thu Jan 19, 2023 3:26 pm
by richmond62
If you click on a vertex while the option key is down you create a new vertex which you can drag to where you want.
Super! Thank you very much.

I wonder if there is a way to fake the Option key being down so that would happen when an end user does a left-click
(i.e. standard mouse-click on a line)?