Release of G'MIC 3.4

Like what kind of operation ?

Like da_discard, da_stats, da_sort, etc. Basically da_ math parser things that works similar to the non-da_ ones, but specialized for dynamic array.

There could rotate() too, but that might be confusing with rot()

implements cumulate() and mirror() in the math parser.

1 Like

index() is my next target…

EDIT: Done.

1 Like

implements normalize(A,min_value,max_value) that returns the normalized version of A.

I’m done for today (and probably this week).
Lot of new functions added in the math parser, hopefully this will make some things simpler when developping fill or eval expressions!

3 Likes

Math expressions are growing up.
mathref
Not Right Now! but maybe as the year progresses, perhaps the idea of a parallel reference, on the notion that math expression “intelligence” is gaining parity with that of the command line interpreter, or!
mathsec
if that seems an unseemly promotion, allow Mathematical Expressions to spread along a series of pages, similar to “List of Commands”

In each approach, the major breaks coincide with the major heads on the current math expression page. I do not think any serious re-writing is necessary or appropriate, but it could be convenient if the focus of my attention happens to be “Vectors” or “Dynamic Arrays” — I can go to the particular topic page directly.

In Tutorial Land, I’m contemplating similar (but not identical) math topic partitioning. Necessary in Tutorial Land, methinks, because the material goes to greater length.

I guess you can rename math expression to JIT expression, and have two separate sections which you automatically scroll to when you clicks the links to those sections. One for generals and the other which is called command-based functions and with examples from the command to clarify.

1 Like

Ah me. Whilst setting about incorporating curve into the innards of ABN Filigrees, I encountered curve's recalcitrance about do anything with its tilt angular argument.

ABN Filligrees, still doing dot products applied to thickness. Relative thickness of 50, 45° tilt.

calcirc

My curve test framework. Make a circular plot set, center it, render it via curves:

circtest: -skip ${1=30},${2=34}
   foreach {
             thick,angle=$*
             =>. canvas
	     # 100 Circular plots,
	     # centered on w/2,w/2
             100,1,1,2,cexp([0,2*pi*x/(w-1)])
             =>. plots
             f[plots] ">
                        begin(
                        mat=eye(3);
                        scale=0.375*w#0;
                        mat[0]=scale;
                        mat[2]=w#0/2;
                        mat[4]=-scale;
                        mat[5]=w#0/2
		                     );
	     (mat*[I(#$plots,x),1])[0,2]"
	     # curve plot
             curve[canvas] [plots],$thick,$angle,1,0,1,255
	     rm[plots]
   }

Some tests at various angles:

gosgood@bertha $gmic run '-m /dev/shm/circtest.gmic  \
                          version                    \
                          256,256,1,1 =>. canvas     \
			              +circtest[canvas] 30,45    \
			              +circtest[canvas] 30,15    \
			              +circtest[canvas] 30,-87   \
			              circtest[canvas] 30,0      \
			              append x r2dx. 50%         '

which obtains:

  gmic: GREYC's Magic for Image Computing: command-line interface
        Version 3.3.3 (pre-release #24010617)
        (https://gmic.eu)

        Copyright (c) Since 2008, David Tschumperlé / GREYC / CNRS.
        (https://www.greyc.fr)

circtestout

There is not much tilt.

To paraphrase Henry Ford Sr. on the styling of the Model T: “Any color you want, so long as its black.”

Built just now (22:05 UTC) with:
CImg: (develop) commit 5b0484ed Wed Jan 3 14:18:46 2024 +0100
gmic: (develop) commit 0311eb4b Sat Jan 6 13:58:38 2024 +0100

Ha! minor typo. Omitted $, that’s all.

@@ -28,7 +28,7 @@
         begin(
           const thickness = $2/2;
           const boundary = $5?2:1;
-          U = cexp([ 0,3° ]);
+          U = cexp([ 0,$3° ]);
           A = B = [ 0,0 ];
           pP = J[#-1,-1];
         );

Patch on its way…

1 Like

Ha, thanks !

1 Like

We’re good.

dtdiscuss

2 Likes

On this:

"* Function 'rand(#size,min_value,max_value,_pdf,_precision)' returns the a vector of 'size' random values. "\
"This is the math evaluator analog to command ''noise''."\n\

Can we have optional value seed? Would be great for refactoring rep_stitch a bit.

Use srand(seed).

I know that, but what if you want local random vector per different variables? I’d have to use different ranges of min,max and then subtract so the ranges are the same?

I’m done with filigrees. Time to post the release blurb. Hope this isn’t too long…

New filter Rendering/ABN Filigrees emulates the sort of filigrees found on stock certificates and other sorts of fungible papers of record, paying homage to the American Bank Note Company, a premier engraver of financial paper and active about a century ago.

relnote

To arrive at such pattern work, the filter offers a set of “spinners”, each connected end-to-end to the others, and each able to spin at various clockwise or counterclockwise rates. The final spinner has an attached marker and traces the resulting filigree from the ensemble of rotating spinners. Shift the connection points between spinners to set their lengths and orientations, and adjust their rotation rates as desired. The preview updates in real time to show the kind of filigree that results from the settings. With an interesting pattern in hand, pen settings can be adjusted for line width, opacity, color and calligraphic effects. Outcomes may be layered over one another for ever more complex effects.

2 Likes

Thanks Garry,
I’ve fixed a typo in the section title (Patterns replaces Patterns/) because it was messing up the order of filters in the main tree (many filters were out of section).

Also a request : now that the curve command can render the curve at a “reasonnable” speed, it would be really cool if the filter preview could also render the curve with the chosen “Pen Settings”.
If you don’t have time for this, I can try to do it.

Let me know.

Oooooops. Sorry.

Seems doable, check-in in about an hour. Time to walk the dog…

1 Like