A simple pattern generator

Visuals, audio, animation. Blended, not stirred. If LiveCode is part of your rich media production toolbox, this is the forum for you.

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4219
Joined: Sun Jan 07, 2007 9:12 pm

A simple pattern generator

Post by bn »

I am just looking at old stuff and maybe someone finds some use of the techniques to build up imageData in LC faster.
The way imageData is built in LC it is often a time consuming process. In certain cases one can speed up that process if it is repetitive like for some patterns.
That is the main point of this stack.

Apart from that you can generate fishbone patterns for your wardrobe, give the pattern to a weaver and then give the fabric to your taylor...

Click on all buttons and watch the times.

a pattern.png

Kind regards
Bernd
Attachments
patternBuilding_0_0_7.livecode 2.zip
(154.06 KiB) Downloaded 752 times
richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10430
Joined: Fri Feb 19, 2010 10:17 am

Re: A simple pattern generator

Post by richmond62 »

Very nice, but won't do for my kilt!
-
McIntoshHunting.png
bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4219
Joined: Sun Jan 07, 2007 9:12 pm

Re: A simple pattern generator

Post by bn »

richmond62 wrote: Thu Dec 16, 2021 11:58 am Very nice, but won't do for my kilt!
How utterly true...
But you could still sing "My Heart is in the Highlands, my Heart is not here"
richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10430
Joined: Fri Feb 19, 2010 10:17 am

Re: A simple pattern generator

Post by richmond62 »

Indeed.

Or I could work on a proper Plaid generator to pop out Jacquard Cards.

Your stack is very good re the weft of the material, but it does not do much
for the woof.
jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7423
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: A simple pattern generator

Post by jacque »

richmond62 wrote: Thu Dec 16, 2021 1:01 pm Your stack is very good re the weft of the material, but it does not do much
for the woof.
For that you need a dog.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4219
Joined: Sun Jan 07, 2007 9:12 pm

Re: A simple pattern generator

Post by bn »

jacque wrote: Thu Dec 16, 2021 6:16 pm
richmond62 wrote: Thu Dec 16, 2021 1:01 pm Your stack is very good re the weft of the material, but it does not do much
for the woof.
For that you need a dog.
The dog:
clarus.jpg
clarus.jpg (17.06 KiB) Viewed 33840 times


Kind regards
Bernd
jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7423
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: A simple pattern generator

Post by jacque »

Clarus! I miss you, Clarus. :)
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
stam
Posts: 3214
Joined: Sun Jun 04, 2006 9:39 pm

Re: A simple pattern generator

Post by stam »

Ah the epic dogcow… I miss those times!
Klaus
Posts: 14325
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: A simple pattern generator

Post by Klaus »

Yep, no dog, but a dogcow!
I have a better (more pixelated) photo of it. :-)
clarus.gif
clarus.gif (3.09 KiB) Viewed 33741 times
bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4219
Joined: Sun Jan 07, 2007 9:12 pm

Re: A simple pattern generator

Post by bn »

OK, you asked for it...

Clarus taught me a lot of tricks in LIvecode:

How Clarus can evolve from just a couple of pixels
Clarus get Up.livecode.zip
(23.75 KiB) Downloaded 733 times


How Clarus can make somersaults and make his typical moof
Clarus-TheDogCow.livecode 3.zip
(35.22 KiB) Downloaded 745 times
From the official Technotes
http://www.macfreek.nl/humour/tn31.html




even that he can morph into a 3-D space
Fake3D Clarus-Turn_0_9bn.livecode.zip
(7.29 KiB) Downloaded 758 times
(Code for pseudo 3-D from Michael Kristensen (MicMac)

So I owe Clarus a lot

Kind regards
Bernd
jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7423
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: A simple pattern generator

Post by jacque »

Too cool! Love the fake 3D.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3582
Joined: Mon Jan 22, 2007 7:36 am
Contact:

Re: A simple pattern generator

Post by mwieder »

Speaking of patterns...

I'm trying to do some blender-style diffusion patterns.
I'd like, for instance, to have a triangle with red, green, and blue vertices and have a complex color gradient across the face of the graphic.
I'm guessing LC isn't up to the task since I haven't been able to come up with a way to specify a fillgradient for more than two points not in a line.
Any ideas?
jiml
Posts: 341
Joined: Sat Dec 09, 2006 1:27 am

Re: A simple pattern generator

Post by jiml »

I'd like, for instance, to have a triangle with red, green, and blue vertices and have a complex color gradient across the face of the graphic.
Mark,

Here's a cheat using a group of three graphics.

Jim Lambert
Attachments
TriangleBlend.livecode.zip
(1.06 KiB) Downloaded 689 times
mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3582
Joined: Mon Jan 22, 2007 7:36 am
Contact:

Re: A simple pattern generator

Post by mwieder »

Thanks, Jim. That's pretty much what I'm aiming for, or something like
octa-ply.png
But the thought of tripling the number of polygons I'm dealing with is a deal-breaker.
For a moderately complex graphic with 6000 faces, LC is already too slow for real-time manipulation. Dealing with 18000 polygons just isn't going to work out.
jiml
Posts: 341
Joined: Sat Dec 09, 2006 1:27 am

Re: A simple pattern generator

Post by jiml »

Dealing with 18000 polygons
That's a bit much for LC, for sure.
Maybe try javascript in a browser widget
Post Reply