[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Axiom-math] draw with axiom

From: Francois Maltey
Subject: [Axiom-math] draw with axiom
Date: 06 Feb 2006 13:48:13 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4


I test the draw command, and I have two questions :

1/ The syntax of the options :

draw (sin (1/x), x=0..1, adaptive==false) 
   plots the function with about 50 points. 

minPoints (10000) ; draw (sin (1/x), x=0..1, adaptive==false) 
   plots the function with 10000 points

draw (sin (1/x), x=0..1, adaptive==false, minPoints==10000) 
   seems impossible. 
But the better way to learn a language is to have the same way 
for all the options. Can I hope that axiom will progress ?

2/ Several graph in the same window

Imagine I want to plot x -> 1/x+m*x with m in 
  [-sqrt(3), -1, -1/sqrt(3), 0, 1/sqrt(3), 1, sqrt(3)]

fct (x, m) == 1/x+m*x 

Must I draw the all the functions :
  v1 := draw (fct (x, -sqrt (3)), x=0..5) 
  v2 := draw (fct (x, -1)), x=0..5)    
  v3 := draw (fct (x, -1/sqrt (3)), x=0..5) 
  v4 := draw (fct (x, 0), x=0..5) 
  v5 := draw (fct (x, 1/sqrt (3)), x=0..5) 
  v6 := draw (fct (x, 1)), x=0..5) 
  v7 := draw (fct (x, sqrt (3)), x=0..5) 

I can't plot with the sqrt(3) number, 
but I can with the sqrt(%pi) and sqrt(3.0) values...

putGraph (v1, getGraph (v2, 1), 2)
putGraph (v1, getGraph (v3, 1), 3)
putGraph (v1, getGraph (v4, 1), 4)

makeViewport2D (v1)

I'm a Maple and Mupad user and I can do :
  c1 := _describe_the_first_plot_without_drawing
  c2 := _describe_the_second_plot_without_drawing
  c3 := _describe_the_third_plot_without_drawing
  At the end I type display (c1, c2, c3).

Or, better, 
  fct := (x, m) -> 1/x+m*x ;
  L := [-sqrt(3), -1, -1/sqrt(3), 0, 1/sqrt(3), 1, sqrt(3)] ; 
  display (plot (fct (x, m)$m in L)) ;

Can I do this with axiom or :
Must I really plot the 7 first curves ?
   Or can I define a draw without any window ?
Must I reoppen one of the previous draw, 
   Or can I create a new draw with all the functions ?

Thanks a lot.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]