PIPRIME.FR BLOG

Live fully to honor life

Tag Texpath -- Asymptote Gallery

đź”—generalities-fig059

Figure generalities 059 Generated with Asymptote

Show generalities/fig0590.asy on Github.
Generated with Asymptote 3.00-0.
Categories : Examples 2D | Generalities
Tags : #Basis | #Shading | #Tex/latex features | #Texpath | #Fill/Unfill | #Array

size(16cm,0);

path[] P=texpath("$\displaystyle\int_{-\infty}^{+\infty}e^{-\alpha x^2}\,dx=
\sqrt{\frac{\pi}{\alpha}}$");
pair m=min(P), M=max(P);

axialshade(P,yellow,m,red,(m.x,M.y));
draw(P,0.5*blue);
shipout(bbox(3mm,Fill));

đź”—three-fig010

Figure three 010 Generated with Asymptote

Show three/fig0100.asy on Github.
Generated with Asymptote 3.00-0.
Categories : Examples 3D | Three.asy
Tags : #Plane | #Label (3D) | #Texpath | #Transform (3D) | #Projection (3D) | #Bsp

size(12cm,0);
import bsp;

currentprojection=orthographic(1,1.5,1);

path3 xy=plane((1,0,0),(0,1,0),(0,0,0));
path3 xz=rotate(90,X)*xy;
path3 yz=rotate(-90,Y)*xy;

face[] f;
filldraw(f.push(xy),project(xy),grey);
filldraw(f.push(xz),project(xz),grey);
filldraw(f.push(yz),project(yz),grey);
add(f);

draw(Label("$x$",EndPoint), O--(1,0,0), Arrow3);
draw(Label("$y$",EndPoint), O--(0,1,0), Arrow3);
draw(Label("$z$",EndPoint), O--(0,0,1), Arrow3);
dot(O);

path[] ph=texpath("$\displaystyle\int_{-\infty}^{+\infty}e^{-\alpha x^2}\,dx=
\sqrt{\frac{\pi}{\alpha}}$");
ph =shift((0.5,0.5))*rotate(-45)*scale(1/abs(min(ph)-max(ph)))*ph;

filldraw(project(path3(ph,XYplane)),0.8*yellow);
filldraw(project(path3(ph,ZXplane)),0.8*yellow);
filldraw(project(path3(ph,YZplane)),0.8*yellow);

đź”—three-fig011

Figure three 011 Generated with Asymptote

Show three/fig0110.asy on Github.
Generated with Asymptote 3.00-0.
Categories : Examples 3D | Three.asy
Tags : #Plane | #Label (3D) | #Texpath | #Transform (3D) | #Projection (3D)

import three;
size(10cm,0);
currentprojection=orthographic(1,1.5,1);

path3 xy=XY*unitsquare3, xz=ZX*unitsquare3, yz=YZ*unitsquare3;

draw(xy^^xz^^yz, grey);
path3 p3xy=path3(texpath("$\pi$")[0],XYplane);
p3xy=shift((0.5,0.5,0))*scale3(1/abs(min(p3xy)-max(p3xy)))*p3xy;

surface s=surface(p3xy,planar=true);
draw(s, surfacepen=blue, meshpen=orange+3pt);

transform3 Txz=planeproject(xz,(0,-1,1));
draw(Txz*s, red);

transform3 Tyz=planeproject(yz,(-1,0,1));
draw(Tyz*s, green);

path3 p3xz=Txz*p3xy;
path3 p3yz=Tyz*p3xy;

int lg=length(p3xy);
triple p;
for(int i=0;i<=lg;++i) {
  p=point(p3xy,i);
  draw(p--point(p3xz,i), yellow);
  draw(p--point(p3yz,i), orange);
}

0%