Thread: dynamical data visualisation

  1. #1
    Registered User
    Join Date
    Apr 2007

    Question dynamical data visualisation

    I want points to be printed in a coordinate system say one per second - usually I give the points to gnuplot, but this is static- I want them to "move"
    for(i=0 ; i<=N ; x+=dx , y+=dy , i++)
    	if(x<-0.99 || x>0.99)
    	if(y<-0.99 || y>0.99)
    	printf("%i	%.4f	%.4f	%.4f\n",i,x,y,sqrt(x*x+y*y));
    	fprintf(f_ptr,"%i %.4f %.4f %.4f\n",i,x,y,sqrt(x*x+y*y));
    How do I get on with this problem ?

  2. #2
    Kernel hacker
    Join Date
    Jul 2007
    Farncombe, Surrey, England
    I think you need to explain what you want to do a bit better.

    There are a few different ways to make something move, one of them is to change the scale - say you have a sine-wave that you want to grow bigger and smaller, then you would change the value you multiply the sine-value by, depending on how big or small you want it.

    Of course, as far as I understand it, gnuplot will just draw one set of data at any given time.

    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  3. #3
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    The edge of the known universe
    If you're intending to have something continually update, you'll be needing a graphics library of some sort.
    Which then begs the question as to which OS/Compiler you're using.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. xor linked list
    By adramalech in forum C Programming
    Replies: 23
    Last Post: 10-14-2008, 10:13 AM
  2. Bitmasking Problem
    By mike_g in forum C++ Programming
    Replies: 13
    Last Post: 11-08-2007, 12:24 AM
  3. brace-enclosed error
    By jdc18 in forum C++ Programming
    Replies: 53
    Last Post: 05-03-2007, 05:49 PM
  4. Program Crashing
    By Pressure in forum C Programming
    Replies: 3
    Last Post: 04-18-2005, 10:28 PM
  5. Replies: 1
    Last Post: 07-31-2002, 11:35 AM