Roxame Home - Diccan Home

Forms

Main commands

Main forms

forms.c gives you, in comment, a more complete list of available forms. Beware, to prevent ambiguities, some form names include a "_" (underscore) character at end.
Many of these forms are of little interest if used in command line mode, but are useful in autonomous modes.

At start, the form parameters are : centered, sepia, medium size... You can change the parameters, the new values will be applied the next time you call a form.
For each parameter, you can have a list typing the name followd by c

one. resets the parameters to their default value.
any choses all the parameers art random
.rd after a parameter draws at random a value out of the values list e.g. forms.rd .

line_ : line is the simplest , lines draws a series of four lines, h and v draw horizontals/verticals brim to brim, at random positions, hhhh and vvvv repeat the operation four times

(the triangle_ list) :  triangle draws a triangle, nearly "any" ; the series triangle_up, triangle_down, triangle_left, triangle_down draws triangles rested on a base line (defined by the above parameters) and completes the form with a triangle the apex of which is on the image brim, respectively up, down, on left and on right ;

(the arrow_ series) arrow_left, roof, arrow_right, stake gives also a series of triangles, these ones are isoceles, with a vertical or horizontal base.

(the rectangle_ series) : rectangle, as above, and square

(the quad_, quadrileteral series )  quad draws a quadrilateral, more or less any (but convex) ; the series quad_up, quad_down, quad_left, quad_right draws quadrilaterals as the above series: rested on the base leine, and extended up to one of the brims.
- myQuad is a quadrilatral defined by the coordinates of its four apexes ; you can modify them by yourself, by hanging the definition of myQuad in the dictionary.

(the polygon_ series) pentagon, hexagon, octagon, octagon_regular

(the ellipse_ series) ellipse, circle . circle est équivalent à isocele ellipse

(the pixel_ series)   we have not implemented the unique pixel . ; pixels creates a ckoud of pixels on the whole image, with a 1% density ; pixelsn does the the same, with the density indicated by the precedent number ; for instance 100  pixelsn covers the totality of the present image. pixel_cloud makes a small cloud (to be made better).

The two following types are not forms properly, but can be useful or funny.

letters scatters some letters

CF_portrait and CF_landscape do comics... (see Comics) draw frames for comic book pages.

FRForm creates a form in each region

An example of form genearation, got with the sequence rectangle, yellow paint circle, any lines, any lines 


Parameters

Position

position.c guves a list. Note that the positions (position) are generally assigned with some imprecision, it is a style choice for Roxame

center is the default value
SPL and SPR are the "strong points" at left and rightsont les "points forts"
HLC, HRC, LLC and LRC are the four corners
at_right, at_left, above, under , or even tpg , work "typographically"; when you arrive at the end of the line, you draw on the next one

Orientation

(orient) May be ascend or descend). Default value : ascend. Useful only for line drawing.

Mode of drawing

(modeg) , draw (default value) just draws the lines around. paint gives a full form

Size  

(size) sets the global size of the form (diagonal of the circumscribing rectangle). Default value : big . bord_a_bord extends the form from one edge to the orther, horizontally or vertically, .

Proportion

(prop) sets the proportions of the form, from horizontal to vertical . Default value  isocele ,with heigth and width idential (bur for exceptions).
isocele rectangle is equivalent to square, and isocele ellipse to circle

Thickness

(e) ; very_thin sets it to one pixel ;  very-thick to 10 pixels. Default value : thin.

Style and Ubris

(style) tries to go farther than the current (and default) mode, rigid
sensitive is an attempt to simulate the hesitations of the drawer hands ; if Roxame is "sentitive", then to draw lines it takes into account the ubris parametef which can be cold, sober, alive, drunk or mad . if ubris is cold, then sensitive gives the same as rigitsoft generates a variable thickness,
frenzied is a macro for sensitive mad

Presently, ubris is not linked to mood (shoul be)

Blend mode

(blend) offerts three values :
imperative draws tge form and suppresses all precedents pixels on ints space
additive makes an additive mix
subtractive makes a subtractive mix .

Color

, see the dedicated page.

Clipping 

(clip) is useful only on a segmented image. Default value clip_touch, adding only the forme itself.

Philosophy

A lot of forms !

Programming tips

The code : Forms The hub for forms generation

A form command triggers a series of functions, listed in the Form() function

1. In the execution of a script, the Form is applied as many times as Framecount. Otherwise once only.

2. For the first Form cases, the number in DEF is applied. :

arrow_left 27
arrow_right 26
ellipse 32
h 103
h_ 107
hexagon 34
line 10
line_ 10
octagon 31
octagon_regular 46
pentagon 33
pixel_cloud 2
pixels form 1
pixelsn form 3
point_cloud form 2
quad 39
quad_down 12
quad_left 23
quad_righ 22
quad_up 11
rectangle 30
roof 20
stake 21
triangle 14
triangle_down 14
triangle_left 25
triangle_right f 24
triangle_up f 13
triptych_ 43

Beyond 100, ther are special cases

case 100 : Do_Form( 30 + 2*((int)random(2)) ); break; //circle and rectangle at random
case 101 : Q(5); Do_Form(32); break; //circle
case 102 : Q(5); Do_Form(30); break; //square
case 103: yc = yd + (int) random(yf - yd); A1(xd, yc, xf, yc); refOrient = 0; Do_Form(10); break; //h
case 104: xc = xd + (int) random(xf - xd); A1(xc, yd, xc, yf); refOrient = 0; Do_Form(10); break; //v
case 105 : AA(); break; // AA
case 106 : //myQuad
case 107 : A1(0, number, wwidth, number) ; Do_Form(10); break; //h_
case 108 : A1(number, 0, number, wheight); Do_Form(10); break; //v_

Do_Form calls, cascading,
xLineTo , which separates the line into steps
mLineTo, which defines the rectangle for the line
mkLine, whidh applies a pattern (a square presently) on each point

Then, id surfacic, calls Regtabimx();

All that in img3
Then finally calls Mix(1,1), which means : one image in img, plus imgsource (?) See Roxame_Mix

Main functions 

A1()  : computes the location of the formrelated to a given rectangle
A()  :  assigns a position number and lauches the AA function
AA()  : computes the circumscribing rectangle from the parameters (notably refSize and refProp)
T() : assigns a value to refSize and launches AA
Q() : assigns a value to refProp and lauches AA
Regtabmix()  : segmentation on the rex array
Do-Form() : actually builds the form, using the functions xMoveTo and xLineTo . The form is drawn in imgx, then reported in the current image by the Report function

sMoveTo() : assigns values to xp and yp (location of a starting point)
xLineTo() : draws a line from xp.yp , using the mLineTo function , wizth refStyle parameeter

mLineTo() : draws a line using the mkLine function
mkLine() : draws the motive for mLineTo parameter : refThick, works always in blach, transformed afterars


Report() : reports a form acccording to blending anc clipping modes
Parameter() : assigns parameters coming from the parser


Position() : assigns positons coming from the parser parser
Form() : launchs the computation of a form from the parser

How to modify the code, add new functions

- in Do-DForm : open a new case with instrucdtions to draw
- in mkLine, create new patterns (you will have to create the access path)
- in Report : open a new case ; blending toolbox can be indefinitely extended.

 

Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.