saltire family of websites buy a classpad now! download eActivities

Home
ClassPad News
Overview
Online Store
Books
Explorations
Canyon's Corner
Downloads
Links
My Account
Contact
Saltire Family of Websites

Prof. Dr. Ludwig Paditz,

University of Applied Sciences

Germany

Workshop I (Ciechocinek, Poland, 27th June 2004)

Several aspects of 2D-graphics with the ClassPad300

      Let’s beginning with some nice graphics (cartesian, polar or parametric): 

      1. a snowflake  r1 = r(q) = 3 - cos(6q) ,  0 < q < 2p , -8 < x < 8 , -4 < y < 4.

              

      2. a butterfly swimmer  r2 = r(q) = q , r3 = r(q) = 1,  0 < q < p , -20 < x < 20 , -10 < y < 10 ,

                                              y4 = y(x) = - (x-5)^6 + 5,  y5 = y(x) = - (x+5)^6 + 10, y6 = y(x) < 0.

              

       3. a spider  r7 = r(q) = q * (sin(q))^2 ,   0 < q < 6p , -10 < x < 10 , -6 < y < 6 .

              

      4.  the number 8  r8 = r(q) = cos(q/2)* sin(q) ,   0 < q < 4p , -1.6 < x < 1.6 , -0.8 < y < 0.8 .

               

5.  a hibiscus flower  r9 = r(q) = 2,  r10 = r(q) = sin(22q)+3+lg(9) ,

      r11 = r(q) = sin(13q)+5+lg(5) , 0 < q < 2p , -8 < x < 8 , -7 < y < 7 .

              

  1. a bear  r12 = r(q) = 4*sin(q/5),  0 < q < 5p , -6.8 < x < 6.8 , -3.5 < y < 4.5,

             xt13 = x(t) = cos(t/5+p) ,                 yt13 = y(t) = sin(t/5+ p) – 1,

             xt14 = x(t) = cos(t)/3 + 1.6 ,             yt14 = y(t) = sin(t)/3 + 1.6,

             xt15 = x(t) = cos(t)/3 - 1.6,               yt15 = y(t) = sin(t)/3 + 1.6,

             xt16 = x(t) = cos(t/5-p/4) + 2.8 ,      yt16 = y(t) = sin(t/5-p/4) + 2.8,

             xt17 = x(t) = cos(t/5+p/4) - 2.8,       yt17 = y(t) = sin(t/5+p/4) + 2.8.

              

7. a CD-rom r18 = r(q) = seq(R, R, 1.1, 4, 0.145), 0 < q < 2p , -9 < x < 9, -4.5 < y < 4.5.

              

  1. a disk-capacitor  List1 = {-5, -4, -3, -2 ,-1, 0, .5, 1, 1.25, 1.5, 1.75, 2} ,

      List2 = {-.75, -.5, -.25, 0, .25, .5, .75}*p , (input in main-menu)

y21= y(x) = p*signum((-x)^.5),  y22 = y(x) = -y21(x), (the disk-capacitor)

xt23 = x(t) = e^List1 * cos( (2t+1)p / 11) + List1 + 1 ,  (the potential-lines)

yt23 = y(t) = e^List1 * sin((2t+1)p / 11) + (2t+1)p / 11 ,

xt24 = x(t) = e^t * cos( List2 ) + t + 1 ,  (the field-lines)

yt24 = y(t) = e^t * sin( List2 ) + List2,     -6 < q,t < 5 , -5 < x < 10, -5 < y < 5 .

       

9. a four-leaf clover r25 = r(q) = 3*cos(2q), 0 < q < 2p , -8 < x < 8, -4 < y < 4 .

              

10. an exponential spiral r26 = r(q) = 3*e^(ln(0.8)* q /(2p)), 0 < q < 8p , -6 < x < 6, -3 < y < 3 .

               

Now consider a random function, using the random generator of ClassPad300:

     y27 = y(x) = rand(0,1) , y28 = y27(x) , -10 < x < 10, -1 < y < 2 .

              

Now consider a random hatching in a parallelogram:

     y27 = y(x) = rand(0,1) , y29 = y(x) = y27(x)*(2-|x-2|) + 2 + (|x-2|-x)/2,  0 < x < 4, 0 < y < 4 .

              

Now consider a periodic random signal with time out (pause):

y27 = y(x) = rand(0,1),   y30 = y(x) = ln(cos(x))/ln(cos(x)),   y31 = y(x) = y27(x)*y30(x) ,

-10 < x < 10, -1 < y < 2 .

              

Nonlinear regression in a scatter plot (log-log-scaling of the view-window):

     xlist = {61, 62, 64, 66, 68, 71, 75, 80, 90, 99, 110, 130, 145, 175, 220, 300, 390} ,

     ylist = {1000, 500, 200, 100, 50, 20, 10, 5, 2, 1, 0.5, 0.2, 0.1, 0.05, 0.02, 0.01, 0.005} .

     view-window :   10 < x < 400 ,   -100 < y < 1100 .

              

     view-window (log-log-scaling):   50 < x < 500 ,    0.001 < y < 1500 .

              

                

The power-regression in the log-log-scaling shows the bad approximation:

              

Problem:         How to improve the nonlinear regression?

Solution:         Transformation of the pairs (xi, yi) into (log(xi), log(yi)+3) ,

                        where “+3” to get positive values again.

Power-regression gives  y19 = y(x) = a*x^b, i.e. log(y(x)) + 3 = a*log(x)^b , thus

                        y20 = y(x) = 10^(y19(log(x) – 3) = 10^y19(log(x)) / 10^3 .

              

              

              

Summary: the scatter-plot with nonlinear regression:

              

              

            left:       the simple power-regression   y(x) = a * x^b

right:     the power regression with log-log-data: log(y(x)) + 3 = A * (log(x))^B

            and back-transformation:  y(x) = 10^( A * (log(x))^B – 3)