PIPRIME.FR BLOG

Live fully to honor life

Tag Line type -- Asymptote Gallery

🔗generalities-fig019

Figure generalities 019 Generated with Asymptote

Show generalities/fig0190.asy on Github.
Generated with Asymptote 3.00-0.
Categories : Examples 2D | Generalities
Tags : #Basis | #Point/Dot | #Line type

size(8cm,0);

pair A,B,C;
A=(0,0);B=(1,0);C=(2,0);
draw(A,8bp+black);
draw(B,8bp+blue);
draw(C,linewidth(8bp));

🔗generalities-fig020

Figure generalities 020 Generated with Asymptote

Show generalities/fig0200.asy on Github.
Generated with Asymptote 3.00-0.
Categories : Examples 2D | Generalities
Tags : #Basis | #Point/Dot | #Line type | #Transform/scale/shift/rotate | #Unitsize | #Path

unitsize(3cm);

pair A=(0,0), B=(1,0), C=(0,1);
path trig;
trig=A--B--C--cycle;
draw(trig);
dot(trig,linewidth(4bp));
dot(shift(3,0)*trig,red+4bp);

🔗generalities-fig023

Figure generalities 023 Generated with Asymptote

Show generalities/fig0230.asy on Github.
Generated with Asymptote 3.00-0.
Categories : Examples 2D | Generalities
Tags : #Basis | #Line type | #Path

size(6cm,0);

pair A=(0,0), B=(1,0), C=(0,1);
draw(A--B--C--cycle);
draw(A--B,linewidth(4bp));

🔗generalities-fig024

Figure generalities 024 Generated with Asymptote

Show generalities/fig0240.asy on Github.
Generated with Asymptote 3.00-0.
Categories : Examples 2D | Generalities
Tags : #Basis | #Line type | #Path

size(6cm,0);

pair A=(0,0), B=(1,0), C=(0,1);
draw(A--B--C--cycle);
draw(A--B,(red+green));

🔗generalities-fig025

Figure generalities 025 Generated with Asymptote

Show generalities/fig0250.asy on Github.
Generated with Asymptote 3.00-0.
Categories : Examples 2D | Generalities
Tags : #Basis | #Line type | #Path

size(6cm,0);

pair A=(0,0), B=(1,0), C=(0,1);

draw(A--B,.8white+6bp);
draw(A--C,.6white+6bp);
draw(B--C,.4white+6bp);

draw(A--B--C--cycle,yellow);

🔗generalities-fig026

Figure generalities 026 Generated with Asymptote

Show generalities/fig0260.asy on Github.
Generated with Asymptote 3.00-0.
Categories : Examples 2D | Generalities
Tags : #Basis | #Line type | #Path

size(8cm,0);

path p1=(0,0)--(1,1);
path p2=(2,0)--(3,1);

draw(p1,linewidth(5mm));
draw(p2,linewidth(5mm));
draw(p1--p2, 3mm+.8blue);
draw(reverse(p1)--p2, 1mm+.8red);

🔗generalities-fig028

Figure generalities 028 Generated with Asymptote

Show generalities/fig0280.asy on Github.
Generated with Asymptote 3.00-0.
Categories : Examples 2D | Generalities
Tags : #Basis | #Line type

unitsize(cm);
path line=(0,0)--(6,0);

draw(line,solid);
draw(shift(0,-1)*line,dotted);
draw(shift(0,-2)*line,dashed);
draw(shift(0,-3)*line,longdashed);
draw(shift(0,-4)*line,dashdotted);
draw(shift(0,-5)*line,longdashdotted);

🔗generalities-fig029

Figure generalities 029 Generated with Asymptote

Show generalities/fig0290.asy on Github.
Generated with Asymptote 3.00-0.
Categories : Examples 2D | Generalities
Tags : #Basis | #Line type

unitsize(1cm);
path line=(0,0)--(6,0);
pen my_pen=linetype("24 8 8 8");

draw(line,linetype("24 8 8 8"));
draw(shift(0,-1)*line,my_pen+.8red);
draw(shift(0,-2)*line,my_pen+.7green+4bp);
draw(shift(0,-3)*line,linetype("24 8 8 8",false)+.7blue+4bp);
draw(shift(0,-4)*line,linetype("24 8 8 8",true,false)+4bp);
draw(shift(0,-5)*line,linetype("24 8 8 8",false,false)+.5red+blue+4bp);

🔗generalities-fig047

Figure generalities 047 Generated with Asymptote

Show generalities/fig0470.asy on Github.
Generated with Asymptote 3.00-0.
Categories : Examples 2D | Generalities
Tags : #Basis | #Arrows/Bars | #Line type

path line=(0,0)--(5cm,0);
transform T=shift(0,-cm);

draw(line,linewidth(1mm),Bars);
draw(T^2*line,Bars(5mm));
draw(T^3*line,linewidth(1mm),Bars(5mm));
draw(T^4*line,dotted+red,Bars);

🔗solids-fig003

Figure solids 003 Generated with Asymptote

Show solids/fig0030.asy on Github.
Generated with Asymptote 3.00-0.
Categories : Examples 3D | Solids.asy
Tags : #Solid | #Revolution | #Projection (3D) | #Draw (3D) | #Surface | #Sphere | #Wire frame | #Line type

// Author: John Bowman.
size(6cm, 0);
import solids;
currentprojection=orthographic(0, 10, 5);

nslice=4*nslice;

revolution r=sphere(O, 1);
draw(surface(r), lightgrey+opacity(0.75));

skeleton s;
r.transverse(s, reltime(r.g, 0.6), currentprojection);
r.transverse(s, reltime(r.g, 0.5), currentprojection);
draw(s.transverse.back, linetype("8 8", 8));
draw(s.transverse.front);

r.longitudinal(s, currentprojection);
draw(s.longitudinal.front);
draw(s.longitudinal.back, linetype("8 8", 8));

🔗three-fig005

Figure three 005 Generated with Asymptote

Show three/fig0050.asy on Github.
Generated with Asymptote 3.00-0.
Categories : Examples 3D | Three.asy
Tags : #Geometry (3D) | #Wire frame | #Line type | #Intersection | #Interp

import three; import math;
size(8cm,0);
currentprojection=obliqueX;

real h=2;
triple A =(0,0,h), B=(h,0,0), C=(0,h,0), D=(0,0,0);
triple Ip=midpoint(A--C), J=midpoint(A--B);
triple K=shift((0,0,-0.25*h))*A;

triple M=interp(K,J,intersect(K,J,normal(new triple[]{B,C,D}),D));
triple Np=interp(K,Ip,intersect(K,Ip,normal(new triple[]{B,C,D}),D));

dot("$A$", A, align=Z);  dot("$B$", B, align=S);
dot("$C$", C, align=S);  dot("$D$", D, align=W);
dot("$I$", Ip, align=N); dot("$J$", J, align=W);
dot("$K$", K, align=NE); dot("$M$", M, align=SE);
dot("$N$", Np, align=S);

draw(A--B--C--cycle^^B--M^^C--Np^^J--M^^Ip--Np);
draw(A--D--C^^D--B^^J--K^^K--Ip, dashed);

🔗three-fig008

Figure three 008 Generated with Asymptote

Show three/fig0080.asy on Github.
Generated with Asymptote 3.00-0.
Categories : Examples 3D | Three.asy
Tags : #Bsp | #Wire frame | #Line type | #Plan

import bsp;

typedef path3[] shape;

shape operator *(transform3 T, shape p){
  shape os;
  for(path3 g:p) os.push(T*g);
  return os;
}


path3 path(triple[] T){
  path3 P;
  for(triple i:T) P=P--i;
  return P;
}

void addshapes(face[] F, shape[] shp, pen drawpen=currentpen, pen fillpen=white)
{
  for(int i=0; i < shp.length; ++i)
    for(int j=0; j < shp[i].length; ++j) {
      path3 g=shp[i][j];
      picture pic=F.push(g);
      if(fillpen != nullpen) filldraw(pic,project(g),fillpen, drawpen);
      else draw(pic,project(g),drawpen);
      // filldraw(pic,g,currentlight.intensity(F[F.length-1].point)*fillpen, drawpen);
    }
}

shape cylinder(real R=1, real H=1, int n=18){
  shape Cyl;
  triple[] CTop;
  triple[] CBot;
  for(int i=0; i <= n; ++i)
    CBot.push((R*cos(2pi*i/n), R*sin(2pi*i/n),0));
  CTop = CBot+(0,0,H);
  for(int i=0; i < n; ++i)
    Cyl.push(CBot[i]--CBot[i+1]--CTop[i+1]--CTop[i]--cycle);

  path3 P=path(CBot)--cycle;
  Cyl.push(P);
  Cyl.push(shift(H*Z)*P);

  return Cyl;
}


size(10cm,0);

currentprojection=orthographic(1,1,1);

shape cyl1 = cylinder(R=1, H=2);

shape[] group={cyl1};

face[] hidden, visible;
addshapes(hidden, group, drawpen=linewidth(bp));
addshapes(visible, group, drawpen=dotted, fillpen=nullpen);
add(hidden);
add(visible);

shipout(format="pdf");

0%