Hi Lous, this example may be useful:
http://rosettacode.org/wiki/Animate_a_pendulum#J

On Wed, Feb 8, 2017 at 11:48 AM, Raul Miller <[email protected]> wrote:

> I think sys_timer is the right way to go for this kind of thing.
>
> That said, if you are doing something interactive (rather than canned)
> you should also think about driving motion from mouse events.
>
> Good luck,
>
> --
> Raul
>
>
> On Wed, Feb 8, 2017 at 11:42 AM, Louis de Forcrand <[email protected]>
> wrote:
> > Hi everyone,
> >
> > I've been looking into the Qt facilities available in J recently, and I
> read that 2D graphics are best done with gl2.
> >
> > I hacked together a simple program that displays a ball which bounces
> around the isidraw container. Having never really done any graphics-related
> programming, I used the window driver's timer function to call sys_timer at
> regular intervals, which erases the previous circle, draws the new one, and
> updates speed and position global vars.
> > The advantage of using the wd timer is that I can create a button which
> calls "wd 'timer 0; pclose'" in order to exit the program in a clean
> fashion without having to break.
> >
> > I suspect there is a better way to do this; how would the seasoned J
> programmers on this forum go about creating such an animation?
> >
> > All help appreciated!
> > Louis
> >
> > PS: I hardly have any web-related (html, css, php, etc.) programming
> skills, but any info about doing this in JHS is welcome as well.
> > ----------------------------------------------------------------------
> > For information about J forums see http://www.jsoftware.com/forums.htm
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to