Page 1 of 3 123 LastLast
Results 1 to 10 of 22

Thread: Super Function Plotter: Inspired from pages 41 - 64

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    thinBasic MVPs kryton9's Avatar
    Join Date
    Nov 2006
    Location
    Naples, Florida & Duluth, Georgia
    Age
    67
    Posts
    3,869
    Rep Power
    404

    Super Function Plotter: Inspired from pages 41 - 64

    Super Function Plotter Updated. Buttons now do a lot of the equations as presets in this section.

    Just run the program, a default plot appears. Click the Clear B button for example to see how it changes the plot.

    The program does 2 types of plots. I named them simple and complex. If both x and y are assigned formulas, this is considered complex. In this case t is assigned the range values. Follow the instructions below and then press the other function buttons. The numbers in some of the button match which exercise problem. I made the changes Petr recommended. Now lines does line strip. New updates attached to this message.

    If only y has a formula and x is empty, then it plots the simple. In this case, the range is assigned to x.

    It is all interactive and dynamic, so you will get the idea right away. Now you can just type in values for many of the equations on pages 41-64 and see the results.
    Perhaps someone would like to carry on assign some of the named equations to the clear buttons. I started to do it, but decided it is a task for someone else to carry on.

    If you want the x or y axis not showing, just assign it the same color as the background.

    The default starts up with exercise 1 from page 53, you will see why I chose this one, it makes a cool big S.
    Attached Images Attached Images
    Attached Files Attached Files
    Acer Notebook: Win 10 Home 64 Bit, Core i7-4702MQ @ 2.2Ghz, 12 GB RAM, nVidia GTX 760M and Intel HD 4600
    Raspberry Pi 3: Raspbian OS use for Home Samba Server and Test HTTP Server

  2. #2
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,128
    Rep Power
    732

    Re: Super Function Plotter: Inspired from pages 41 - 64

    Kent,

    this is great!
    I like how dynamic you made it, you type formula and it is immediately represented.


    Very good job!,
    Petr
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB

  3. #3
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,128
    Rep Power
    732

    Re: Super Function Plotter: Inspired from pages 41 - 64

    Little hint: to render the function smooth using lines, do not use %GL_LINES, as they take each 2 vertices as definition for single line. Use %GL_LINE_STRIP instead in PlotFunc and PlotFunc2, and you will see it will look much better.


    Petr
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB

  4. #4
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,777
    Rep Power
    10

    Re: Super Function Plotter: Inspired from pages 41 - 64

    Kent,

    great great job: an on the fly calculator using Eval module.

    Thanks a lot for this example, it can become a great thinBasic flagship.

    Eros


    PS, Little speed improvement: it is not necessary to call more than once setEvals... functions (where you call Eval_SetNumber in order link internal Eval module variable to script variable) unless you change to script variable associated to Eval counterparts. Once script variables are linked, they will remain linked unless you have to change some links.
    This would give a little more speed in execution.

    www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

  5. #5
    thinBasic MVPs kryton9's Avatar
    Join Date
    Nov 2006
    Location
    Naples, Florida & Duluth, Georgia
    Age
    67
    Posts
    3,869
    Rep Power
    404

    Re: Super Function Plotter: Inspired from pages 41 - 64

    Eros not sure I understand how to do what you said, but will study later today. And I will add changes you recommend and Petr's too-- later. Then it is ready to be added to by the next coder. Perhaps Stan can tinker with it, a good way to get his hands into thinBasic quickly with this skeleton in place.

    Glad you guys liked it, thanks for the feedback. Also of course Petr helped a lot as mentioned in the comments, but wanted to say thanks here too.
    Acer Notebook: Win 10 Home 64 Bit, Core i7-4702MQ @ 2.2Ghz, 12 GB RAM, nVidia GTX 760M and Intel HD 4600
    Raspberry Pi 3: Raspbian OS use for Home Samba Server and Test HTTP Server

  6. #6

    Re: Super Function Plotter: Inspired from pages 41 - 64

    the ultimate beauty, thanks kent.
    can we call thinbasic a GymnasticsBasic in which the hard to achieve is possible!.
    also big thanks to stan for his very fine book. and for stirring such an interest in math and opengl.



  7. #7
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,777
    Rep Power
    10

    Re: Super Function Plotter: Inspired from pages 41 - 64

    Quote Originally Posted by kent sarikaya
    Eros not sure I understand how to do what you said, but will study later today.
    Sorry, my mistake. Non need to do anything.
    I was thinking you was linking using Eval_LinkExt method.

    Forget my suggestion.
    Eros
    www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

  8. #8
    thinBasic MVPs kryton9's Avatar
    Join Date
    Nov 2006
    Location
    Naples, Florida & Duluth, Georgia
    Age
    67
    Posts
    3,869
    Rep Power
    404

    Re: Super Function Plotter: Inspired from pages 41 - 64

    Quote Originally Posted by zak
    the ultimate beauty, thanks kent.
    can we call thinbasic a GymnasticsBasic in which the hard to achieve is possible!.
    also big thanks to stan for his very fine book. and for stirring such an interest in math and opengl.
    Thanks Zak. Stan's book brings the beauty in math to the nonMath people like me who are interested, but had no clue. And I had no idea that openGL could do 2D to that extent even though I played with it for some time now. I always thought you had to use GDI or GDI+ routines. So for me, two major light bulbs went off with Stan's book.

    Also the fact that others got into it so much too and did so many conversions is really exciting.
    Acer Notebook: Win 10 Home 64 Bit, Core i7-4702MQ @ 2.2Ghz, 12 GB RAM, nVidia GTX 760M and Intel HD 4600
    Raspberry Pi 3: Raspbian OS use for Home Samba Server and Test HTTP Server

  9. #9

    Re: Super Function Plotter: Inspired from pages 41 - 64

    Kent:

    The Super Function Plotter is a beautiful piece of work, illustrating the power and facility of thinBasic, and is a very useful application. Many thanks for sharing you'r work.

    Don
    XPS 1710

  10. #10
    Member sblank's Avatar
    Join Date
    Feb 2010
    Location
    Wayne City, Illinois
    Posts
    80
    Rep Power
    23

    Re: Super Function Plotter: Inspired from pages 41 - 64

    Kent!!

    What a fantastic piece of programming! This is great and I'm having a lot fun playing with functions.

    Great work... just great!

    Stan

Page 1 of 3 123 LastLast

Similar Threads

  1. Super Demos!
    By Reinking in forum TBGL General
    Replies: 4
    Last Post: 26-05-2006, 22:18

Members who have read this thread: 0

There are no members to list at the moment.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •