Messing with Morphing

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

Re: Messing with Morphing

Post by stevepoole »

Hi Folks,

Here is the latest (final ?) version for you to experiment with. UNZIP, LRUN, or long Press ESC. (Caters for 12 and/or 30 summits).

Includes a 'swimming man' at one point... I have tidied up the code. Add to the drawings using 12 or 30 point circuits in DATA.

Take care RENUMbering code, so as not to corrupt lines 180,210,1500,1530. Close circuits with the final DATA equal to the initial ones.

I will try 60 summit cicrcuits to improve sketches. (Variables SD). And detailed animations too, as the 'swimmer' is only just noticeable !
Morf5.zip
(1.9 KiB) Downloaded 28 times


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

Re: Messing with Morphing

Post by stevepoole »

Hi All,

After running for several hours, I noticed a glitch with some occasional missed DATA READing targets. Here is the fix :

Alter these lines to :
180 SD=30 : HH=260+90*RND(2)
245 CLS: CLS#2: SD=30: main
247 if RND<.5: animate

Sorry folks, but things seem to be all ok since. Steve.


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,

morph5_bas failed at line 800 and 820 with the qx variable clashing with the Qliberator QX command.

I changed this to QXa and all is fine.

I did mention this earlier, but it looks like you do not use Qliberator.


Regards,

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

Re: Messing with Morphing

Post by stevepoole »

Hi Derek,
Thanks for reporting the problem with Minerva. I have renamed Qx to xq for any eventual other versions.

I have increased the number of summits on the sketches to 60. Output is more precise, but this barely slows the morphing process !

Animating sketches is now being investigated, but I won't do it with 60 sides, as that means typing in at least 240 Data elaments.

There is not much more to do to improve the Morphing code. Animation will be another kettle of fish I fear...

Here is a sreen shot of the ghost of 'you know who' embodying our favourite computer system. Steve.
Capture d’écran (267).png


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

Re: Messing with Morphing

Post by stevepoole »

Hi,

To avoid having to type much DATA in a peripheral circuit, it could be useful to use a curve-smoothing routine, to get rid of 'cubist effects'.

'Spline' algorythms have the inconvenient of not hitting the control points. So I tried one of my own old programs to do the job.

This works fine, but as always 'corners' are smoothed too ! The contour program is currently being improved still further...

See the result on the 60-point Sir Clive head : (It needs testing with smaller resolutions. I will report back). Steve.
Capture d’écran (271)bis.jpg
Capture d’écran (267).png


User avatar
tofro
Font of All Knowledge
Posts: 2702
Joined: Sun Feb 13, 2011 10:53 pm
Location: SW Germany

Re: Messing with Morphing

Post by tofro »

It's really amazing how you get to a recognizeable face with these few bits of information!


ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
stevepoole
Super Gold Card
Posts: 716
Joined: Mon Nov 24, 2014 2:03 pm

Re: Messing with Morphing

Post by stevepoole »

Hi Again,

As suspected, curve smoothing is most effective using fewer control points. Just 30 peripheral summits here : Regards, Steve.
Capture d’écran (273).png
Capture d’écran (272).png


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

Re: Messing with Morphing

Post by stevepoole »

Hi Tofro and others,

I am experimenting for the best peripheral point-choices in order to further develop morphing animations.

Tests with 12-point shapes give varied results, using a contour defining program.
'S' is recognizable, but to get it right I had to reconfigure the summits somewhat. (You see the result before tweaking).
The 'swimmers' are almost acceptable, and animate well, with 16 intermediate frames...
'4' is very poor, simply because it is impossible to design properly with just 12 points !

In a nutshell, it all depends on how you choose your representative points on the periphery.
60 points seem a reasonable compromise, to avoid too much DATA entry time.
By the way, has anyone seen a 'SPLINES' curve-fitting routine done for the QL ? Steve.
Capture d’écran (276).png
Capture d’écran (277).png
Capture d’écran (278).png
Capture d’écran (279).png


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

Re: Messing with Morphing

Post by stevepoole »

Hi Folks,

Yes, the morph routine is slowly getiing its teeth into animation. (Apparently the technique is called 'tweening' by professionals).

Here are three 'leap' drawings, where tweening achieves 32 intermediate images , with just 120 coordinates.... Quite fast & fluid.
Capture d’écran (292)bis.jpg


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

Re: Messing with Morphing

Post by stevepoole »

Hi all,

Background screens can now also be incorporated behind the animations : Will increase the number of animation frames shortly to say 9.

The whole code has been optimised and is now much easier to handle. Will release another version soon. Regards, Steve.
Capture d’écran (296).png


Post Reply