Nouvelle API de géométrie dynamique

instance.showMenuItems('code','fullscreen'); window.engine = engine; const O = Point(0,0).nom("O").trace(); const A = Point(-4,3).nom("A").trace(); const B = Point(-2,-2).nom("B").couleur("rouge").trace().aura(30); const C = Point(3,-1).nom("C").couleur("rouge").trace(); const Ap = Point(-3.95,2.95); const BC = Droite(B,C).nom("(BC)").opacite(0.4).dash().trace(); const h = homothetie(A,2/5.); const M = h(B).couleur("vert").nom("M"); const N = h(C).couleur("vert").nom("N"); const MN = Droite(M,N).nom("(MN)").opacite(0.4).dash().trace(); const t1 = Triangle(A,B,C); const t2 = Triangle(A,M,N); const center = t1.centreCercleInscrit().plus().trace(); Groupe(A,B,C,M,N).map( p => p.setLabelPositionCenter(center) ); const hp = homothetie( t1.centreCercleInscrit() ,1.02); const hm = homothetie( t2.centreCercleInscrit() ,0.98); hp(t1).mapSegments("epaisseur",2).couleur("rouge").trace(); hm(t2).mapSegments("epaisseur",3).couleur("vert").trace(); const P = t1.centreCercleCirconscrit().trace(); Cercle(P,A).trace(); M.trace(); N.trace(); plan.onclick = ()=>{ B.couleur("bleu") }; plan.ondrop = ()=>{ B.couleur("rouge") }; const img = Image('https://imgs.search.brave.com/fnKtEMZwuwC333tqh-fUiKVCtQbuGU7rWj5A6Je4I48/rs:fit:500:0:1:0/g:ce/aHR0cHM6Ly93YWxs/cGFwZXJzLmNvbS9p/bWFnZXMvaGQvbWVs/dGluZy1iYXJ0LXNp/bXBzb24tY29vbC1k/cmlwLXp2OTh0a2Jn/anNuMnNzbTMuanBn') .createHandles().trace(); const g = affine( [ [1 , 0 , 2], [0 , 1.1, 3] ] ); const f = transformation( (x,y) => { return { x: x, y: 0.5*x*x } }); const f_A = f(A).nom("f(A)").trace(); const f_B = f(B).nom("f(B)").trace(); const sAB = Segment(A,B).trace(); const fsAB = f( sAB.polygonize(50) ).trace();

Laisser un commentaire

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *