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: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4000
Joined: Sun Jan 07, 2007 9:12 pm
Location: Bochum, Germany

A simple pattern generator

Post by bn » Wed Dec 15, 2021 9:47 pm

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 161 times

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9380
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: A simple pattern generator

Post by richmond62 » Thu Dec 16, 2021 11:58 am

Very nice, but won't do for my kilt!
-
McIntoshHunting.png

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4000
Joined: Sun Jan 07, 2007 9:12 pm
Location: Bochum, Germany

Re: A simple pattern generator

Post by bn » Thu Dec 16, 2021 12:53 pm

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: 9380
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: A simple pattern generator

Post by richmond62 » Thu Dec 16, 2021 1:01 pm

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: 7230
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: A simple pattern generator

Post by jacque » 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.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4000
Joined: Sun Jan 07, 2007 9:12 pm
Location: Bochum, Germany

Re: A simple pattern generator

Post by bn » Thu Dec 16, 2021 7:03 pm

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 7629 times


Kind regards
Bernd

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7230
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: A simple pattern generator

Post by jacque » Fri Dec 17, 2021 12:03 am

Clarus! I miss you, Clarus. :)
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

stam
Posts: 2682
Joined: Sun Jun 04, 2006 9:39 pm
Location: London, UK

Re: A simple pattern generator

Post by stam » Fri Dec 17, 2021 9:23 am

Ah the epic dogcow… I miss those times!

Klaus
Posts: 13828
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: A simple pattern generator

Post by Klaus » Fri Dec 17, 2021 10:49 am

Yep, no dog, but a dogcow!
I have a better (more pixelated) photo of it. :-)
clarus.gif
clarus.gif (3.09 KiB) Viewed 7530 times

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4000
Joined: Sun Jan 07, 2007 9:12 pm
Location: Bochum, Germany

Re: A simple pattern generator

Post by bn » Fri Dec 17, 2021 11:18 am

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 173 times


How Clarus can make somersaults and make his typical moof
Clarus-TheDogCow.livecode 3.zip
(35.22 KiB) Downloaded 173 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 164 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: 7230
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: A simple pattern generator

Post by jacque » Sat Dec 18, 2021 9:49 pm

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: 3581
Joined: Mon Jan 22, 2007 7:36 am
Location: Berkeley, CA, US
Contact:

Re: A simple pattern generator

Post by mwieder » Fri Mar 11, 2022 4:37 am

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: 336
Joined: Sat Dec 09, 2006 1:27 am
Location: Los Angeles

Re: A simple pattern generator

Post by jiml » Fri Mar 11, 2022 7:23 pm

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 126 times

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Location: Berkeley, CA, US
Contact:

Re: A simple pattern generator

Post by mwieder » Fri Mar 11, 2022 7:59 pm

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: 336
Joined: Sat Dec 09, 2006 1:27 am
Location: Los Angeles

Re: A simple pattern generator

Post by jiml » Fri Mar 11, 2022 10:23 pm

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

Post Reply

Return to “Multimedia”