Results 1 to 7 of 7

Thread: Plot a mathematical wave function in 3d

  1. #1
    Junior Member Newbie
    Join Date
    Jan 2019
    Posts
    3

    Plot a mathematical wave function in 3d

    Hi everyone, I'm a beginner and i would like to learn how to plot a 3d wave model of an electromagnetic wave using the function on android studio using OpenGL

  2. #2
    Senior Member Regular Contributor
    Join Date
    Oct 2014
    Posts
    110
    Then you have to search for tutorials that suit your needs. If you want to learn OpenGL, try learnopengl.com.

  3. #3
    Junior Member Newbie
    Join Date
    Jan 2019
    Posts
    3
    Which tutorial should i start with if i wanna plot something like this, and is it possible to use OpenGL to plot smth like that base on a mathematical equation?
    Attached Images Attached Images

  4. #4
    Senior Member Regular Contributor
    Join Date
    Oct 2014
    Posts
    110
    is it possible to use OpenGL to plot smth like that base on a mathematical equation?
    First of all I am not sure if OpenGL is really what you are looking for. OpenGL is a low level Graphics API. You can render/plot basically everything, at the cost of doing a lot of programming yourself. You have to set up everything yourself and is nothing that will be done in 2 month. For example: For plotting you will probably need text and numbers and this kind of stuff is not included in the current core OpenGL API. You have to code it yourself or use additional libraries for that.

    So the question is why do you want to use OpenGL in particular? Do you want to write your own graphics/plotting application or do you just want to plot some arbitrary mathematical function for work/homework/fun? In the latter case you should use Python (with additional imported modules), Scilab, Octave or Matlab (commercial). All those languages/tools have a plotting lib included. So you can write some code to describe your mathematical function, generate some sample data and plot it with a single command.

    If you really want to learn graphics programming with OpenGL than go to learnopengl.com and work through the whole first chapter. I think for simple math plotting you will not need much more. Maybe the section about text rendering might be of additional interest.

  5. #5
    Junior Member Newbie
    Join Date
    Jan 2019
    Posts
    3
    Because i need to develop an android app for this

  6. #6
    Senior Member Regular Contributor
    Join Date
    Oct 2014
    Posts
    110
    Quote Originally Posted by lzydavid View Post
    Because i need to develop an android app for this
    Then you have to start working on some tutorials to do the rendering yourself or try to use an existing library that already supports plotting.

  7. #7
    Senior Member OpenGL Lord
    Join Date
    Mar 2015
    Posts
    6,674
    Quote Originally Posted by lzydavid View Post
    Because i need to develop an android app for this
    Android has many APIs for doing basic drawing tasks that don't require OpenGL or any other low-level tools. If you don't want to get down into the details of low-level technologies, you should investigate them.

Similar Threads

  1. Turn a function plot in 2D directly into 3D
    By sueyllam in forum OpenGL: Basic Coding
    Replies: 9
    Last Post: 12-05-2013, 02:51 AM
  2. Mathematical calculations using OGSL
    By rtvd in forum OpenGL: GLSL
    Replies: 1
    Last Post: 06-17-2005, 07:35 AM
  3. plot a function
    By xbass in forum OpenGL: General
    Replies: 2
    Last Post: 11-02-2004, 08:40 AM
  4. Mathematical Question
    By dutchstud in forum OpenGL: Advanced Coding
    Replies: 3
    Last Post: 02-15-2002, 10:51 PM
  5. Mathematical Question
    By dutchstud in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 02-15-2002, 02:43 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean