WeBWorK Main Forum

Smoother Dynamic Image

by Utku Demir -
Number of replies: 1
Hi all,

I have been trying to plot s smoother dynamic images, but no success so far. I found a couple of ways to possibly handle this: http://webwork.maa.org/moodle/mod/forum/discuss.php?d=3653 , but these methods didn't change anything for me. Also, here is the code I am using right now

######### (Setup section):

$gr1 = init_graph(-4,-4,4,4, axes=>[0,0], grid=>[5,5], size=>[150,150] );$form1= Formula("3*sin(2*x)");

($f1n) = plot_functions($gr1, "$form1 for x in <-4,4> using color:blue and weight:2");$f1n->steps(5000);
$fig1 = image(insertGraph($gr1),
width=>300,height=>300,tex_size=>800);

######### (Text section (After BEGIN_TEXT)):

\{ $fig1 \} I do wonder what I do wrong. Aside from changing the steps(), I had also tried a method that was given in the link I provided:$f = Formula("3*sin(2*pi/3 * (x - 1)) + 3");
add_functions($gr, "$f for x in <-10,0> using color:blue and weight:2");
add_functions($gr, "$f for x in <0,10> using color:blue and weight:2");

Could you guys help me with this?

Kind regards,
Utku Demir

$gr1 = init_graph(-4,-4,4,4, axes=>[0,0], grid=>[5,5], size=>[150,150] );  but then ask for an image to be used at 300 x 300 pixels in $fig1 = image(insertGraph(\$gr1),