首页 > 其他 > 详细

带坐标轴的几何画板

时间:2020-03-03 20:33:04      阅读:74      评论:0      收藏:0      [点我收藏+]

 

 

技术分享图片

技术分享图片
 1 ---
 2 > id: demo
 3 
 4 Here is a geopad with axes and coordinate system
 5 
 6     figure
 7       x-geopad(width=600 height=400 x-axis="-6,6,1" y-axis="-4,4,1" axes grid padding=5): svg
 8         circle.move.green(name="p" cx=2 cy=2)
 9         path.green(x="segment(point(0,0),p)")
10         circle.red(x="complexRoot(p,3,0)" name="r0")
11         circle.red(x="complexRoot(p,3,1)" name="r1")
12         circle.red(x="complexRoot(p,3,2)" name="r2")
13         path.red(x="polygon(r0,r1,r2)")
content.md
技术分享图片
 1 import {Complex, Point} from @mathigon/fermat;
 2 import {Step} from ../shared/types;
 3 
 4 
 5 export function demo($step: Step) {
 6   $step.model.complexRoot = (p: Point, n: number, i: number) => {
 7     const c = new Complex(p.x, p.y);
 8     const root = c.root(n, i);
 9     return new Point(root.re, root.im);
10   };
11 }
function.ts

 

技术分享图片

 

选自:https://github.com/mathigon/textbooks/tree/master/content/complex

 

带坐标轴的几何画板

原文:https://www.cnblogs.com/wangshixi12/p/12404336.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!