dynamical data visualisation

This is a discussion on dynamical data visualisation within the C Programming forums, part of the General Programming Boards category; I want points to be printed in a coordinate system say one per second - usually I give the points ...

  1. #1
    Registered User
    Join Date
    Apr 2007
    Posts
    13

    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"
    Code:
    for(i=0 ; i<=N ; x+=dx , y+=dy , i++)
    	{
    	
    	if(x<-0.99 || x>0.99)
    	dx*=-1.0;
    	if(y<-0.99 || y>0.99)
    	dy*=-1.0;
    	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
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    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.

    --
    Mats
    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 wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,656
    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.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

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-07-2007, 11:24 PM
  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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21