Messing with Morphing

Anything QL Software or Programming Related.
stevepoole
Super Gold Card
Posts: 716
Joined: Mon Nov 24, 2014 2:03 pm

Messing with Morphing

Post by stevepoole »

Hi Folks,
I tried to write a New Year program with 2023 morphing into 2024, but did not have enough time.

Since, I doodled around and messed about with the idea that this year QL is 40, and completed the demo routine.

The principal is to define characters using 12 numbered summits, and then swap the sides progressively.

The hard part was getting the sides to move without using trigonometry, just coordinates, using little array sapce.

This version is a demo to illustrate the principle. It uses pauses to make the output slow enough to see. Tested: QPC2 and SGC.
morf.zip
(1.58 KiB) Downloaded 66 times


Derek_Stewart
Font of All Knowledge
Posts: 3975
Joined: Mon Dec 20, 2010 11:40 am
Location: Sunny Runcorn, Cheshire, UK

Re: Messing with Morphing

Post by Derek_Stewart »

HI Steve,

Nice program.

You need to change the variable QX in line 850, this conflicts with the Qliberator QX command.


Regards,

Derek
stevepoole
Super Gold Card
Posts: 716
Joined: Mon Nov 24, 2014 2:03 pm

Re: Messing with Morphing

Post by stevepoole »

Morphing in progress on two characters . Steve.
Capture d’écran (182).png


stevepoole
Super Gold Card
Posts: 716
Joined: Mon Nov 24, 2014 2:03 pm

Re: Messing with Morphing

Post by stevepoole »

Hi Folks,

Just tweaked the program to animate the morphing process better. No need for a new version yet, as development is underway.
But I did have to add a couple of extra arrays, to enable a 'playback', after the initial calculation run: Q to 3 and Q to 4. Regards, Steve.
Capture d’écran (194).png
Capture d’écran (195).png


stevepoole
Super Gold Card
Posts: 716
Joined: Mon Nov 24, 2014 2:03 pm

Re: Messing with Morphing

Post by stevepoole »

Hi All,
Just a couple of changes to a For loop, and now the morphing gets animated as you would expect.

Each character now deforms progressively into the other ! (I had to construct this code step by step, to avoid memory usage).

Still needs some more thought though, before releasing the version. Here are a couple of samples : Q-L , Q-S, L-4 , Regards Steve.
Capture d’écran (201).png
Capture d’écran (199).png
Capture d’écran (197).png


stevepoole
Super Gold Card
Posts: 716
Joined: Mon Nov 24, 2014 2:03 pm

Re: Messing with Morphing

Post by stevepoole »

Hi everybody,

Here is the latest version of the animated Morphing prototype. (Just starting to develop it for animating moving objects too).

Where will it go from here ? Steve.
Morf3.zip
(1.74 KiB) Downloaded 50 times
Capture d’écran (205).png
Capture d’écran (208).png


stevepoole
Super Gold Card
Posts: 716
Joined: Mon Nov 24, 2014 2:03 pm

Re: Messing with Morphing

Post by stevepoole »

Hi again,

One problem I am finding is that 12 peripheral summits are not enough. So I will rewrite the arrays to cater for more detailed objects.

16 intermediate forms are adequate, 32 are rather slow. FILLing is non-re-entrant, so I will not use it, to allow simple articulations.

The screen shots show how to animate movements between two objects. This divides data entries by 16...! (Compression ?). Steve.

The next version won't be ready just yet... as I will have to seize many DATA lists to get a demo restarted !
Capture d’écran (216).png
Capture d’écran (215).png


martyn_hill
Aurora
Posts: 933
Joined: Sat Oct 25, 2014 9:53 am

Re: Messing with Morphing

Post by martyn_hill »

Hi Steve!

Once again, I'm so impressed to see you develop these comp science ideas on our beloved platform...

Just didn't want you to think that no one is reading your posts with very keen interest!


User avatar
pjw
QL Wafer Drive
Posts: 1316
Joined: Fri Jul 11, 2014 8:44 am
Location: Norway
Contact:

Re: Messing with Morphing

Post by pjw »

Yup. Heres another reader :)


Per
dont be happy. worry
- ?
stevepoole
Super Gold Card
Posts: 716
Joined: Mon Nov 24, 2014 2:03 pm

Re: Messing with Morphing

Post by stevepoole »

Hi Guys, Thanks for you encouraging comments !

Well 30 peripheral points is still not enough to produce a recognizable Sir Clive portrait... as you can see.

But it does allow for more flexible sketches. here are the results of entering data for 3 morphs :

I will get my head around animations next. New version soon. Regards, Steve.
Capture d’écran (235).png
Capture d’écran (259).png
Capture d’écran (251).png
Capture d’écran (257).png


Post Reply