4.tracing of Conics in Cartesian Coordinates:-: Load Wxdraw2d False
4.tracing of Conics in Cartesian Coordinates:-: Load Wxdraw2d False
wxmx 1 / 15
4.Tracing of Conics in
Cartesian coordinates :-
(%i1) load(draw)$
(%i2) wxdraw2d(
transparent=false,
fill_color=red,
title="ellipse",
color=gray30,
line_width=5,
ellipse(0,6,3,2,360,−360),
transparent=true,
color=blue,
line_width=3,
ellipse(2,5,6,2,360,−360)
)$
(%t2)
Ankit Chauhan (87053).wxmx 2 / 15
(%i3) wxdraw2d(transparent=true,
fill_color=yellow,
color=gray30,
transparent=false,
line_width=3,
ellipse(0,0,3,3,360,360),
title="circle",
xrange=[−6,6],
yrange=[−4,4])$;
(%t3)
(%i4) kill(all)$
(%i4) a:2$b:2$c:2$
wxplot3d((c.sqrt(1−(x/a)^2−(y/b)^2)),[x,−4,4],[y,−4,4])$
(%t4)
Ankit Chauhan (87053).wxmx 3 / 15
(%i4) kill(all)$a:2$b:4$c:3$
wxplot3d((c.((x/a)^2+(y/b)^2)),[x,−4,4],[y,−4,4],[title,"elliptic parabol
(%t4)
(%i4) kill(all)$a:8$b:8$c:4$
wxplot3d((c.((x/a)^2+(y/b)^2)),[x,−4,4],[y,−4,4],
[title,"circular paraboloid"])$
(%t4)
Ankit Chauhan (87053).wxmx 4 / 15
(%i4) kill(all)$a:2$b:1$c:4$
wxplot3d((c.sqrt((x/a)^2+(y/b)^2)),[x,−4,4],[y,−4,4],
[title,"elliptical cone"])$
(%t4)
1 hyperboid of one
sheet:(x/a)^2+(y/b)^2-
(z/c)^2=1
(%i4) kill(all)$a:2$b:3$c:4$
wxplot3d((c.sqrt((x/a)^2+(y/b)^2−1)),[x,−4,4],[y,−4,4],
[title,"hyperboid of one sheet"])$
(%t4)
Ankit Chauhan (87053).wxmx 5 / 15
2 hyperboid of two
sheet:(z/c)^2-(x/a)^2-
(y/b)^2=1
(%i4) kill(all)$a:2$b:3$c:4$
wxplot3d((c.sqrt((x/a)^2+(y/b)^2+1)),[x,−4,4],[y,−4,4],
[title,"hyperboid of two sheet"])$
(%t4)
5.Obtaining Surface of
Revolution of Curves :-
Ankit Chauhan (87053).wxmx 6 / 15
(%i5) wxdraw2d(
dimensions=[600,600],
xrange=[0,3],
yrange=[−4,4],
xaxis=true,
yaxis=false,
xtics=false,
ytics=false,
line_width=2,
title="f(x)=x^2 on [0,2]",
color=black,
explicit(x^2,x,0,2)
);
(%t5)
(%o5)
Ankit Chauhan (87053).wxmx 8 / 15
(%i6) wxdraw3d(
axis_3d=false,
dimensions=[600,600],
view=[85,10],
xrange=[0,3],
zrange=[−4,4],
/*xtics=false,
ytics=false,
ztics=false,*/
color=black,
nticks=600,
line_width=2,
parametric(t,0,0,t,0,3),
parametric(0,t,0,t,−4,4),
parametric(0,0,t,t,−4,4),
color=dark_grey,
parametric_surface(r,r^2·cos(t),r^2·sin(t),r,0,2,t,0,2·%pi),
color=black,
parametric_surface(r,r^2·cos(t),r^2·sin(t),r,1.3,1.4,t,0,2·%pi),
color=dark_red,
parametric_surface(1.4,u^2·cos(t),u^2·sin(t),u,0,1.4,t,0,2·%pi)
);
(%t6)
(%o6)
Ankit Chauhan (87053).wxmx 9 / 15
(%i7) wxdraw2d(
dimensions=[600,600],
title="f(x)=x^2 on [0,2]",
grid=true,
xaxis=true, xaxis_type=solid,
xaxis_color =red, xrange =[−3,3],
yaxis=true, yaxis_type=solid,
yaxis_color =green, yrange = [0,9],
xtics=false,ytics=false,
color = magenta,
line_width = 3,
explicit(x^2, x, 0,2)) ;
(%t7)
(%o7)
Ankit Chauhan (87053).wxmx 10 / 15
(%i8) wxdraw3d(
axis_3d=false,
dimensions=[600,600],
view=[85,10],xrange=[−3,3],
yrange=[−3,3],
zrange=[0,9],
xtics=false , ytics=false, ztics=false,
color=black , nticks=600, line_width=2,
parametric(t,0,0,t,−3,3),
parametric(0,t,0,t,−3,3),
parametric(0,0,t,t,0,9),
color=dark_grey,
parametric_surface(r·cos(t),r·sin(t),r^2,r,0,2,t,0,2·%pi),
color=black,
parametric_surface(r·cos(t),r·sin(t),r^2,r,1.3,1.4,t,0,2·%pi),
color=dark_red,
parametric_surface(r·cos(t),r·sin(t),1.4^2,r,0,1.4,t,0,2·%pi)
);
(%t8)
(%o8)
Ankit Chauhan (87053).wxmx 11 / 15
(%i11) f(x):=0.3·x$
g(x):=sin(x)$
wxdraw2d(dimensions=[600,600],
xrange=[−%pi,%pi],
yrange=[−1.2,1.2],
color=blue,
explicit(f(x),x,−%pi,%pi),
color=red,
explicit(g(x),x,−%pi,%pi));
(%t11)
(%o11)
Ankit Chauhan (87053).wxmx 12 / 15
(%i12) wxdraw3d(
line_width=2,
parametric(t,0,0,t,−%pi,%pi),
parametric(0,t,0,t,−1.2,1.2),
parametric(0,0,t,t,−1.2,1.2),
parametric_surface(r,g(r)·sin(t),g(r)·cos(t),r,−2.356,2.356,t,0,2·%pi)
);
(%t12)
(%o12)
(%i13) wxdraw2d(
dimensions=[600,600],
line_width=2,
title="f(x)=cosh(x) on [-2,2]",
color=black, explicit(cosh(x),x,−2,2));
(%t13)
(%o13)
Ankit Chauhan (87053).wxmx 14 / 15
(%i14) wxdraw3d(
line_width=2,
parametric(t,0,0,t,−2.2,2.2),
parametric(0,t,0,t,−4,4),
parametric(0,0,t,t,−4,4),
nticks=600,
surface_hide=true,
wired_surface=true,
color=dark_grey,
parametric_surface(r,cosh(r)·cos(t),cosh(r)·sin(t),r,−2,2,t,0,2·%pi),
color=dark_red);
(%t14)
(%o14)
(%i16) wxdraw2d(
dimensions=[600,600],
line_width=2,
title="f(x)=sin(3x)+x on [0,1.9]",
color=black,
explicit(f(x),x,0,1.9));
(%t16)
(%o16)