Asymptote and opacity – fig0080

Category: Asymptote,Examples 2D,OpacityPh. Ivaldi @ 11 h 54 min

Figure 0008
(Compiled with Asymptote version 1.87svn-r4652)
    
import edvenn_pi;

// ColorDodge: Brightens the backdrop color to reflect the source color. Painting
// with black produces no change.
string blend="ColorDodge";

size(10cm,0);

path [] edvenn= EdVenn(4);
pen [] fillp= new pen[]{black, red, green, blue};
pen p=linewidth(1mm);

for (int i=0; i<4; ++i) {
  fillp[i]=fillp[i]+opacity(.5,blend=blend);
  filldraw(edvenn[i], fillpen=fillp[i], drawpen=linewidth((i+1)*mm/2));
 }

shipout(bbox(2mm,invisible),"pdf");

Mots-clefs :


Asymptote and opacity – fig0070

Category: Asymptote,Examples 2D,OpacityPh. Ivaldi @ 10 h 54 min

Figure 0007
(Compiled with Asymptote version 1.87svn-r4652)
    
import edvenn_pi;

// Lighten: Selects the lighter of the backdrop and source colors:
// The backdrop is replaced with the source where the source is lighter;
// otherwise, it is left unchanged.
string blend="Lighten";

size(10cm,0);

path [] edvenn= EdVenn(4);
pen [] fillp= new pen[]{black, red, green, blue};
pen p=linewidth(1mm);

for (int i=0; i<4; ++i) {
  fillp[i]=fillp[i]+opacity(.5,blend=blend);
  filldraw(edvenn[i], fillpen=fillp[i], drawpen=linewidth((i+1)*mm/2));
 }

shipout(bbox(2mm,invisible),"pdf");

Mots-clefs :


Asymptote and opacity – fig0060

Category: Asymptote,Examples 2D,OpacityPh. Ivaldi @ 9 h 54 min

Figure 0006
(Compiled with Asymptote version 1.87svn-r4652)
    
import edvenn_pi;

// Darken: Selects the darker of the backdrop and source colors:
// The backdrop is replaced with the source where the source is darker;
// otherwise, it is left unchanged.
string blend="Darken";

size(10cm,0);

path [] edvenn= EdVenn(4);
pen [] fillp= new pen[]{black, red, green, blue};
pen p=linewidth(1mm);

for (int i=0; i<4; ++i) {
  fillp[i]=fillp[i]+opacity(.5,blend=blend);
  filldraw(edvenn[i], fillpen=fillp[i], drawpen=linewidth((i+1)*mm/2));
 }

shipout(bbox(2mm,invisible),"pdf");

Mots-clefs :


Asymptote and opacity – fig0050

Category: Asymptote,Examples 2D,OpacityPh. Ivaldi @ 8 h 54 min

Figure 0005
(Compiled with Asymptote version 1.87svn-r4652)
    
import edvenn_pi;

// Overlay: Multiplies or screens the colors, depending on the backdrop color.
// Source colors overlay the backdrop while preserving its highlights
// and shadows. The backdrop color is not replaced but is mixed with
// the source color to reflect the lightness or darkness of the backdrop.
string blend="Overlay";

size(10cm,0);

path [] edvenn= EdVenn(4);
pen [] fillp= new pen[]{black, red, green, blue};
pen p=linewidth(1mm);

for (int i=0; i<4; ++i) {
  fillp[i]=fillp[i]+opacity(.5,blend=blend);
  filldraw(edvenn[i], fillpen=fillp[i], drawpen=linewidth((i+1)*mm/2));
 }

shipout(bbox(2mm,invisible),"pdf");

Mots-clefs :


Asymptote and opacity – fig0040

Category: Asymptote,Examples 2D,OpacityPh. Ivaldi @ 7 h 54 min

Figure 0004
(Compiled with Asymptote version 1.87svn-r4652)
    
// The result does not support image conversion.
// You can view it in the file fig0040.pdf.

import edvenn_pi;

// Screen: Multiplies the complements of the backdrop and source color
// values, then complements the result:
// The result color is always at least as light as either of the two constituent
// colors. Screening any color with white produces white; screening
// with black leaves the original color unchanged. The effect is
// similar to projecting multiple photographic slides simultaneously
// onto a single screen.
string blend="Screen";

size(10cm,0);

path [] edvenn= EdVenn(4);
pen [] fillp= new pen[]{black, red, green, blue};
pen p=linewidth(1mm);

for (int i=0; i<4; ++i) {
  fillp[i]=fillp[i]+opacity(.5,blend=blend);
  filldraw(edvenn[i], fillpen=fillp[i], drawpen=linewidth((i+1)*mm/2));
 }

shipout(bbox(2mm,invisible),"pdf");

Mots-clefs :


Asymptote and opacity – fig0030

Category: Asymptote,Examples 2D,OpacityPh. Ivaldi @ 6 h 54 min

Figure 0003
(Compiled with Asymptote version 1.87svn-r4652)
    
import edvenn_pi;

// Multiply: Multiplies the backdrop and source color values:
// The result color is always at least as dark as either of the two constituent
// colors. Multiplying any color with black produces black;
// multiplying with white leaves the original color unchanged. Painting
// successive overlapping objects with a color other than black or
// white produces progressively darker colors.
string blend="Multiply";

size(10cm,0);

path [] edvenn= EdVenn(4);
pen [] fillp= new pen[]{black, red, green, blue};
pen p=linewidth(1mm);

for (int i=0; i<4; ++i) {
  fillp[i]=fillp[i]+opacity(.5,blend=blend);
  filldraw(edvenn[i], fillpen=fillp[i], drawpen=linewidth((i+1)*mm/2));
 }

shipout(bbox(2mm,invisible),"pdf");

Mots-clefs :


Asymptote and opacity – fig0020

Category: Asymptote,Examples 2D,OpacityPh. Ivaldi @ 5 h 54 min

Figure 0002
(Compiled with Asymptote version 1.87svn-r4652)
    
import edvenn_pi;

// Normal: Selects the source color, ignoring the backdrop.
string blend="Normal";

size(10cm,0);

path [] edvenn= EdVenn(4);
pen [] fillp= new pen[]{black, red, green, blue};
pen p=linewidth(1mm);

for (int i=0; i<4; ++i) {
  fillp[i]=fillp[i]+opacity(.5,blend=blend);
  filldraw(edvenn[i], fillpen=fillp[i], drawpen=linewidth((i+1)*mm/2));
 }

shipout(bbox(2mm,invisible),"pdf");

Mots-clefs :


Asymptote and opacity – fig0010

Category: Asymptote,Examples 2D,OpacityPh. Ivaldi @ 4 h 54 min

Figure 0001
(Compiled with Asymptote version 1.87svn-r4652)
    
import edvenn_pi;

string blend="Compatible"; //This is the default value

size(10cm,0);

path [] edvenn= EdVenn(4);
pen [] fillp= new pen[]{black, red, green, blue};
pen p=linewidth(1mm);

for (int i=0; i<4; ++i) {
  fillp[i]=fillp[i]+opacity(.5,blend=blend);
  filldraw(edvenn[i], fillpen=fillp[i], drawpen=linewidth((i+1)*mm/2));
 }

shipout(bbox(2mm,invisible),"pdf");

Mots-clefs :


Asymptote using trembling.asy – fig0150

Category: Asymptote,Examples 2D,trembling.asyPh. Ivaldi @ 4 h 24 min

Figure 0015
(Compiled with Asymptote version 1.87svn-r4652)
    
import trembling;

size(8cm);
startTrembling(angle=10, random=10, frequency=0.5);

draw(unitcircle);

Mots-clefs : ,


Asymptote using trembling.asy – fig0140

Category: Asymptote,Examples 2D,trembling.asyPh. Ivaldi @ 3 h 24 min

Figure 0014

The two further examples show the influence of the parameter frequency.

(Compiled with Asymptote version 1.87svn-r4652)
    
import trembling;

size(8cm);
startTrembling(angle=10, random=10, frequency=0.1);

draw(unitcircle);

Mots-clefs : ,