ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Re: Animations in ConTeXt
@ 2005-05-22 10:19 Richard Hirsch
  2005-05-23 17:54 ` Willi Egger
  2005-05-24 17:58 ` Mojca Miklavec
  0 siblings, 2 replies; 12+ messages in thread
From: Richard Hirsch @ 2005-05-22 10:19 UTC (permalink / raw)


Richard Rascher-Friesenhausen asked
> So again. Is it possible to write something like the above animation
packages 
> in ConTeXt (as a module)?

If Acrobat can display them, ConTeXt can generate them.

Here is a simple example. 

\setupoutput      [pdf]
\setupcolors      [state=start]
\setupinteraction [state=start]
\setuppapersize   [S6][S6]

%% this is just code to get something to animate
\startMPinclusions
  picture thearrow, thestar;

  drawarrow (origin--up) scaled 10mm
    withpen pencircle scaled 3pt
    withcolor .9 red;
  setbounds currentpicture to (fullcircle scaled 22mm);

  thearrow:= currentpicture scaled 5;
  currentpicture:= nullpicture;

  for angle=0 step 72 until 359:
    draw thearrow rotated angle;
  endfor

  thestar:= currentpicture;
  currentpicture:= nullpicture
\stopMPinclusions

\setupMPvariables [drawstar] [rotation=0]
\startuniqueMPgraphic{drawstar}{rotation}
  draw thestar rotated \MPvar{rotation};
\stopuniqueMPgraphic


%% now we define some symbols (the frames of the animated sequence)
\def\definestarsymbol#1{%
  \definesymbol [star #1] [\uniqueMPgraphic{drawstar}{rotation=#1}]}

\definestarsymbol{0}
\definestarsymbol{6}
\definestarsymbol{12}
\definestarsymbol{18}
\definestarsymbol{24}
\definestarsymbol{30}
\definestarsymbol{36}
\definestarsymbol{42}
\definestarsymbol{48}
\definestarsymbol{54}
\definestarsymbol{60}
\definestarsymbol{66}

%% the frames are put into a fieldstack
\definefieldstack [vortex]
  [star 0,  star 6,  star 12, star 18, star 24, star 30, 
   star 36, star 42, star 48, star 54, star 60, star 66]

%% and this is the JavaScrip code that displays the frames one by one
\startJSpreamble MyField used later
var current = 1;
var delay   = 200;              % 200 milliseconds
var timer;
var running = false;            % animation currently not running

function Advance_Angle ( ) {
  this.getField("vortex:"+current).value = "Off";
  if (++current > 12)    % number of frames
    { current = 1; }    % loop through frames
  this.getField("vortex:"+current).value = "On";
}
\stopJSpreamble

%% we want to control the starting and stopping of the animation
\startJScode Rotate_Star uses MyField
if (running) { 
  try { app.clearInterval(timer); } catch(except) {};
  running = false;
}
else { 
  timer = app.setInterval("Advance_Angle()",delay); 
  running = true;
}
\stopJScode


\starttext
  \placefigure [here] [fig:animation]
  {A simple \MetaFun\ animation,
  click \goto {here} [JS(Rotate_Star)] to start (or stop)}
  {\fieldstack [vortex]}
\stoptext

Of course you would want to put the symbol definitions and the
definition of the fieldstack into a loop. I tried 
%% \newcount\angle
%% \angle=0%\zerocount
%% \dorecurse{12} {%
%%    \number\angle:\qquad
%%    \definestarsymbol{\the\angle}
%%    \symbol[star \number\angle]\par
%%    \advance\angle by 6}
and did get the single symbols. I wasn't successful however in putting
the symbol list of the fieldstack definition into a loop. Perhaps the
ConTeXt gurus can help.

Best regards,

  Richard

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Re: Animations in ConTeXt
  2005-05-22 10:19 Animations in ConTeXt Richard Hirsch
@ 2005-05-23 17:54 ` Willi Egger
  2005-05-24 18:07   ` Mojca Miklavec
  2005-05-24 17:58 ` Mojca Miklavec
  1 sibling, 1 reply; 12+ messages in thread
From: Willi Egger @ 2005-05-23 17:54 UTC (permalink / raw)


Hi Richard,

thanks for this example. I tried it and voilà!

Willi

Richard Hirsch wrote:
> Richard Rascher-Friesenhausen asked
> 
>>So again. Is it possible to write something like the above animation
> 
> packages 
> 
>>in ConTeXt (as a module)?
> 
> 
> If Acrobat can display them, ConTeXt can generate them.
> 
> Here is a simple example. 
> 
> \setupoutput      [pdf]
> \setupcolors      [state=start]
> \setupinteraction [state=start]
> \setuppapersize   [S6][S6]
> 
> %% this is just code to get something to animate
> \startMPinclusions
>   picture thearrow, thestar;
> 
>   drawarrow (origin--up) scaled 10mm
>     withpen pencircle scaled 3pt
>     withcolor .9 red;
>   setbounds currentpicture to (fullcircle scaled 22mm);
> 
>   thearrow:= currentpicture scaled 5;
>   currentpicture:= nullpicture;
> 
>   for angle=0 step 72 until 359:
>     draw thearrow rotated angle;
>   endfor
> 
>   thestar:= currentpicture;
>   currentpicture:= nullpicture
> \stopMPinclusions
> 
> \setupMPvariables [drawstar] [rotation=0]
> \startuniqueMPgraphic{drawstar}{rotation}
>   draw thestar rotated \MPvar{rotation};
> \stopuniqueMPgraphic
> 
> 
> %% now we define some symbols (the frames of the animated sequence)
> \def\definestarsymbol#1{%
>   \definesymbol [star #1] [\uniqueMPgraphic{drawstar}{rotation=#1}]}
> 
> \definestarsymbol{0}
> \definestarsymbol{6}
> \definestarsymbol{12}
> \definestarsymbol{18}
> \definestarsymbol{24}
> \definestarsymbol{30}
> \definestarsymbol{36}
> \definestarsymbol{42}
> \definestarsymbol{48}
> \definestarsymbol{54}
> \definestarsymbol{60}
> \definestarsymbol{66}
> 
> %% the frames are put into a fieldstack
> \definefieldstack [vortex]
>   [star 0,  star 6,  star 12, star 18, star 24, star 30, 
>    star 36, star 42, star 48, star 54, star 60, star 66]
> 
> %% and this is the JavaScrip code that displays the frames one by one
> \startJSpreamble MyField used later
> var current = 1;
> var delay   = 200;              % 200 milliseconds
> var timer;
> var running = false;            % animation currently not running
> 
> function Advance_Angle ( ) {
>   this.getField("vortex:"+current).value = "Off";
>   if (++current > 12)    % number of frames
>     { current = 1; }    % loop through frames
>   this.getField("vortex:"+current).value = "On";
> }
> \stopJSpreamble
> 
> %% we want to control the starting and stopping of the animation
> \startJScode Rotate_Star uses MyField
> if (running) { 
>   try { app.clearInterval(timer); } catch(except) {};
>   running = false;
> }
> else { 
>   timer = app.setInterval("Advance_Angle()",delay); 
>   running = true;
> }
> \stopJScode
> 
> 
> \starttext
>   \placefigure [here] [fig:animation]
>   {A simple \MetaFun\ animation,
>   click \goto {here} [JS(Rotate_Star)] to start (or stop)}
>   {\fieldstack [vortex]}
> \stoptext
> 
> Of course you would want to put the symbol definitions and the
> definition of the fieldstack into a loop. I tried 
> %% \newcount\angle
> %% \angle=0%\zerocount
> %% \dorecurse{12} {%
> %%    \number\angle:\qquad
> %%    \definestarsymbol{\the\angle}
> %%    \symbol[star \number\angle]\par
> %%    \advance\angle by 6}
> and did get the single symbols. I wasn't successful however in putting
> the symbol list of the fieldstack definition into a loop. Perhaps the
> ConTeXt gurus can help.
> 
> Best regards,
> 
>   Richard
> 
> _______________________________________________
> ntg-context mailing list
> ntg-context@ntg.nl
> http://www.ntg.nl/mailman/listinfo/ntg-context

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Re: Animations in ConTeXt
  2005-05-22 10:19 Animations in ConTeXt Richard Hirsch
  2005-05-23 17:54 ` Willi Egger
@ 2005-05-24 17:58 ` Mojca Miklavec
  2005-05-24 21:52   ` Hans Hagen
  1 sibling, 1 reply; 12+ messages in thread
From: Mojca Miklavec @ 2005-05-24 17:58 UTC (permalink / raw)


On 5/22/05, Richard Hirsch <richard.hirsch@gmx.net> wrote:
> 
> Of course you would want to put the symbol definitions and the
> definition of the fieldstack into a loop. I tried
> %% \newcount\angle
> %% \angle=0%\zerocount
> %% \dorecurse{12} {%
> %%    \number\angle:\qquad
> %%    \definestarsymbol{\the\angle}
> %%    \symbol[star \number\angle]\par
> %%    \advance\angle by 6}
> and did get the single symbols. I wasn't successful however in putting
> the symbol list of the fieldstack definition into a loop. Perhaps the
> ConTeXt gurus can help.

I discovered some possible sources of problems, but didn't manage to solve them.

I changed this part of code (just for debugging reasons):

\startuniqueMPgraphic{drawstar}{rotation}
  draw thestar rotated \MPvar{rotation};
  % this line was added
  label("\MPvar{rotation}", origin);
\stopuniqueMPgraphic

Problem N. #1:
--------------

Consider now the following definition:

\newcount\angle
\angle=0
\definesymbol
    [star \the\angle]
    [\uniqueMPgraphic{drawstar}{rotation=\the\angle}]
\advance\angle by 6
\definesymbol
    [star \the\angle]
    [\uniqueMPgraphic{drawstar}{rotation=\the\angle}]

This should define two symbols, \symbol[star 0] and \symbol[star 6].
It did, but "rotation=\the\angle" resulted in "6" in both cases (the
last value), so we get two identical pictures. \the\angle can be
replaced manually by 0/6/12/... but that's not the point.

????

Problem N. #2:
--------------

Instead of writing

\definestarsymbol{0}
\definestarsymbol{6}
\definestarsymbol{12}
...

I tried to use:

\newcount\angle
{\angle=0\loop\ifnum\angle<67%
    \definesymbol
        [star \the\angle]
        [{\uniqueMPgraphic{drawstar}{rotation=0}}]
    Defining symbol \the\angle \dots\crlf
    \advance\angle by 6
\repeat}

Because of some unknown reason \symbol[star 0], ... cannot be recalled at all.

Can anyone find the reason for problems? 

I had very similiar problems when trying to add \loop\ifnum...\repeat
to the example in http://www.fi.muni.cz/~xholecek/animations/, which
is written in plain TeX anyway.

Mojca

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Re: Animations in ConTeXt
  2005-05-23 17:54 ` Willi Egger
@ 2005-05-24 18:07   ` Mojca Miklavec
  2005-05-25 15:32     ` Willi Egger
  2005-07-07 15:51     ` Hans Hagen
  0 siblings, 2 replies; 12+ messages in thread
From: Mojca Miklavec @ 2005-05-24 18:07 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 4093 bytes --]

I don't get it. Examples (animations) on
http://www.fi.muni.cz/~xholecek/animations/ compile and work OK with
my TeX and Acrobat (Windows XP, Adobe Acrobat Professional 6.0.1).
However, the example below doesn't work on my computer.

I replaced some lines below with:

\starttext
  \placefigure [here] [fig:animation]
  {A simple \MetaFun\ animation,
  click \goto {here} [JS(Rotate_Star)] to start (or stop) or
  % this line was added as described in MetaFun manual
  click \goto {here} [JS(Walk_Field{vortex})] for next step}
  {\fieldstack [vortex]}
\stoptext 

which results in the PDF file attached.

Stepping in JS(Walk_Field{vortex}) works OK, while continuous
animation in JS(Rotate_Star) doesn't. Is this because of my (old?)
ConTeXt distribution (ver 2005.01.31, fmt 2005.5.16), because of my
(old/buggy?) Acrobat/OS or because of problems in JavaScript?

Thank you,
     Mojca

Willi Egger wrote:
> Hi Richard,
> 
> thanks for this example. I tried it and voilà!
> 
> Willi
> 
> Richard Hirsch wrote:
> > Richard Rascher-Friesenhausen asked
> >
> >>So again. Is it possible to write something like the above animation
> >
> > packages
> >
> >>in ConTeXt (as a module)?
> >
> >
> > If Acrobat can display them, ConTeXt can generate them.
> >
> > Here is a simple example.
> >
> > \setupoutput      [pdf]
> > \setupcolors      [state=start]
> > \setupinteraction [state=start]
> > \setuppapersize   [S6][S6]
> >
> > %% this is just code to get something to animate
> > \startMPinclusions
> >   picture thearrow, thestar;
> >
> >   drawarrow (origin--up) scaled 10mm
> >     withpen pencircle scaled 3pt
> >     withcolor .9 red;
> >   setbounds currentpicture to (fullcircle scaled 22mm);
> >
> >   thearrow:= currentpicture scaled 5;
> >   currentpicture:= nullpicture;
> >
> >   for angle=0 step 72 until 359:
> >     draw thearrow rotated angle;
> >   endfor
> >
> >   thestar:= currentpicture;
> >   currentpicture:= nullpicture
> > \stopMPinclusions
> >
> > \setupMPvariables [drawstar] [rotation=0]
> > \startuniqueMPgraphic{drawstar}{rotation}
> >   draw thestar rotated \MPvar{rotation};
> > \stopuniqueMPgraphic
> >
> >
> > %% now we define some symbols (the frames of the animated sequence)
> > \def\definestarsymbol#1{%
> >   \definesymbol [star #1] [\uniqueMPgraphic{drawstar}{rotation=#1}]}
> >
> > \definestarsymbol{0}
> > \definestarsymbol{6}
> > \definestarsymbol{12}
> > \definestarsymbol{18}
> > \definestarsymbol{24}
> > \definestarsymbol{30}
> > \definestarsymbol{36}
> > \definestarsymbol{42}
> > \definestarsymbol{48}
> > \definestarsymbol{54}
> > \definestarsymbol{60}
> > \definestarsymbol{66}
> >
> > %% the frames are put into a fieldstack
> > \definefieldstack [vortex]
> >   [star 0,  star 6,  star 12, star 18, star 24, star 30,
> >    star 36, star 42, star 48, star 54, star 60, star 66]
> >
> > %% and this is the JavaScrip code that displays the frames one by one
> > \startJSpreamble MyField used later
> > var current = 1;
> > var delay   = 200;              % 200 milliseconds
> > var timer;
> > var running = false;            % animation currently not running
> >
> > function Advance_Angle ( ) {
> >   this.getField("vortex:"+current).value = "Off";
> >   if (++current > 12)    % number of frames
> >     { current = 1; }    % loop through frames
> >   this.getField("vortex:"+current).value = "On";
> > }
> > \stopJSpreamble
> >
> > %% we want to control the starting and stopping of the animation
> > \startJScode Rotate_Star uses MyField
> > if (running) {
> >   try { app.clearInterval(timer); } catch(except) {};
> >   running = false;
> > }
> > else {
> >   timer = app.setInterval("Advance_Angle()",delay);
> >   running = true;
> > }
> > \stopJScode
> >
> >
> > \starttext
> >   \placefigure [here] [fig:animation]
> >   {A simple \MetaFun\ animation,
> >   click \goto {here} [JS(Rotate_Star)] to start (or stop)}
> >   {\fieldstack [vortex]}
> > \stoptext
> >
> > Best regards,
> >
> >   Richard

[-- Attachment #2: star.pdf --]
[-- Type: application/pdf, Size: 34391 bytes --]

[-- Attachment #3: Type: text/plain, Size: 139 bytes --]

_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Re: Animations in ConTeXt
  2005-05-24 17:58 ` Mojca Miklavec
@ 2005-05-24 21:52   ` Hans Hagen
  0 siblings, 0 replies; 12+ messages in thread
From: Hans Hagen @ 2005-05-24 21:52 UTC (permalink / raw)


Mojca Miklavec wrote:

> \newcount\angle
> \angle=0
> \definesymbol
>     [star \the\angle]
>     [\uniqueMPgraphic{drawstar}{rotation=\the\angle}]
> \advance\angle by 6
> \definesymbol
>     [star \the\angle]
>     [\uniqueMPgraphic{drawstar}{rotation=\the\angle}]
> 
> This should define two symbols, \symbol[star 0] and \symbol[star 6].
> It did, but "rotation=\the\angle" resulted in "6" in both cases (the
> last value), so we get two identical pictures. \the\angle can be
> replaced manually by 0/6/12/... but that's not the point.

> Can anyone find the reason for problems? 

\definesymbol[whatever][something which is expanded at the time of invocation



\newcount\angle % dangerous command, better use MyAngle or so

\expanded
   {\definesymbol
      [star \number\angle]
      [\noexpand\uniqueMPgraphic{drawstar}{rotation=\number\angle}]

\advance\angle by 6

\expanded
   {\definesymbol
      [star \number\angle]
      [\noexpand\uniqueMPgraphic{drawstar}{rotation=\number\angle}]

ugly but needed

Hans


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Re: Animations in ConTeXt
  2005-05-24 18:07   ` Mojca Miklavec
@ 2005-05-25 15:32     ` Willi Egger
  2005-07-07 15:51     ` Hans Hagen
  1 sibling, 0 replies; 12+ messages in thread
From: Willi Egger @ 2005-05-25 15:32 UTC (permalink / raw)


Hi Mojca,

this is strange, on my installation with Acrobat 7.0.1 under Windows XP 
both the stepwise and continuous part work properly.

Willi


Mojca Miklavec wrote:
> I don't get it. Examples (animations) on
> http://www.fi.muni.cz/~xholecek/animations/ compile and work OK with
> my TeX and Acrobat (Windows XP, Adobe Acrobat Professional 6.0.1).
> However, the example below doesn't work on my computer.
> 
> I replaced some lines below with:
> 
> \starttext
>   \placefigure [here] [fig:animation]
>   {A simple \MetaFun\ animation,
>   click \goto {here} [JS(Rotate_Star)] to start (or stop) or
>   % this line was added as described in MetaFun manual
>   click \goto {here} [JS(Walk_Field{vortex})] for next step}
>   {\fieldstack [vortex]}
> \stoptext 
> 
> which results in the PDF file attached.
> 
> Stepping in JS(Walk_Field{vortex}) works OK, while continuous
> animation in JS(Rotate_Star) doesn't. Is this because of my (old?)
> ConTeXt distribution (ver 2005.01.31, fmt 2005.5.16), because of my
> (old/buggy?) Acrobat/OS or because of problems in JavaScript?
> 
> Thank you,
>      Mojca
> 
> Willi Egger wrote:
> 
>>Hi Richard,
>>
>>thanks for this example. I tried it and voilà!
>>
>>Willi
>>
>>Richard Hirsch wrote:
>>
>>>Richard Rascher-Friesenhausen asked
>>>
>>>
>>>>So again. Is it possible to write something like the above animation
>>>
>>>packages
>>>
>>>
>>>>in ConTeXt (as a module)?
>>>
>>>
>>>If Acrobat can display them, ConTeXt can generate them.
>>>
>>>Here is a simple example.
>>>
>>>\setupoutput      [pdf]
>>>\setupcolors      [state=start]
>>>\setupinteraction [state=start]
>>>\setuppapersize   [S6][S6]
>>>
>>>%% this is just code to get something to animate
>>>\startMPinclusions
>>>  picture thearrow, thestar;
>>>
>>>  drawarrow (origin--up) scaled 10mm
>>>    withpen pencircle scaled 3pt
>>>    withcolor .9 red;
>>>  setbounds currentpicture to (fullcircle scaled 22mm);
>>>
>>>  thearrow:= currentpicture scaled 5;
>>>  currentpicture:= nullpicture;
>>>
>>>  for angle=0 step 72 until 359:
>>>    draw thearrow rotated angle;
>>>  endfor
>>>
>>>  thestar:= currentpicture;
>>>  currentpicture:= nullpicture
>>>\stopMPinclusions
>>>
>>>\setupMPvariables [drawstar] [rotation=0]
>>>\startuniqueMPgraphic{drawstar}{rotation}
>>>  draw thestar rotated \MPvar{rotation};
>>>\stopuniqueMPgraphic
>>>
>>>
>>>%% now we define some symbols (the frames of the animated sequence)
>>>\def\definestarsymbol#1{%
>>>  \definesymbol [star #1] [\uniqueMPgraphic{drawstar}{rotation=#1}]}
>>>
>>>\definestarsymbol{0}
>>>\definestarsymbol{6}
>>>\definestarsymbol{12}
>>>\definestarsymbol{18}
>>>\definestarsymbol{24}
>>>\definestarsymbol{30}
>>>\definestarsymbol{36}
>>>\definestarsymbol{42}
>>>\definestarsymbol{48}
>>>\definestarsymbol{54}
>>>\definestarsymbol{60}
>>>\definestarsymbol{66}
>>>
>>>%% the frames are put into a fieldstack
>>>\definefieldstack [vortex]
>>>  [star 0,  star 6,  star 12, star 18, star 24, star 30,
>>>   star 36, star 42, star 48, star 54, star 60, star 66]
>>>
>>>%% and this is the JavaScrip code that displays the frames one by one
>>>\startJSpreamble MyField used later
>>>var current = 1;
>>>var delay   = 200;              % 200 milliseconds
>>>var timer;
>>>var running = false;            % animation currently not running
>>>
>>>function Advance_Angle ( ) {
>>>  this.getField("vortex:"+current).value = "Off";
>>>  if (++current > 12)    % number of frames
>>>    { current = 1; }    % loop through frames
>>>  this.getField("vortex:"+current).value = "On";
>>>}
>>>\stopJSpreamble
>>>
>>>%% we want to control the starting and stopping of the animation
>>>\startJScode Rotate_Star uses MyField
>>>if (running) {
>>>  try { app.clearInterval(timer); } catch(except) {};
>>>  running = false;
>>>}
>>>else {
>>>  timer = app.setInterval("Advance_Angle()",delay);
>>>  running = true;
>>>}
>>>\stopJScode
>>>
>>>
>>>\starttext
>>>  \placefigure [here] [fig:animation]
>>>  {A simple \MetaFun\ animation,
>>>  click \goto {here} [JS(Rotate_Star)] to start (or stop)}
>>>  {\fieldstack [vortex]}
>>>\stoptext
>>>
>>>Best regards,
>>>
>>>  Richard
>>>
>>>
>>>------------------------------------------------------------------------
>>>
>>>_______________________________________________
>>>ntg-context mailing list
>>>ntg-context@ntg.nl
>>>http://www.ntg.nl/mailman/listinfo/ntg-context

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Re: Animations in ConTeXt
  2005-05-24 18:07   ` Mojca Miklavec
  2005-05-25 15:32     ` Willi Egger
@ 2005-07-07 15:51     ` Hans Hagen
  2005-07-07 16:11       ` Hans Hagen
  2005-07-07 21:02       ` Mojca Miklavec
  1 sibling, 2 replies; 12+ messages in thread
From: Hans Hagen @ 2005-07-07 15:51 UTC (permalink / raw)


Mojca Miklavec wrote:
> I don't get it. Examples (animations) on
> http://www.fi.muni.cz/~xholecek/animations/ compile and work OK with
> my TeX and Acrobat (Windows XP, Adobe Acrobat Professional 6.0.1).
> However, the example below doesn't work on my computer.
> 
> I replaced some lines below with:
> 
> \starttext
>   \placefigure [here] [fig:animation]
>   {A simple \MetaFun\ animation,
>   click \goto {here} [JS(Rotate_Star)] to start (or stop) or
>   % this line was added as described in MetaFun manual
>   click \goto {here} [JS(Walk_Field{vortex})] for next step}
>   {\fieldstack [vortex]}
> \stoptext 
> 
> which results in the PDF file attached.

> (old/buggy?) Acrobat/OS or because of problems in JavaScript?

works ok here in acrobat 7

(acrobat has fuzzy ways of initializing js and widgets)

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Re: Animations in ConTeXt
  2005-07-07 15:51     ` Hans Hagen
@ 2005-07-07 16:11       ` Hans Hagen
  2005-07-07 21:02       ` Mojca Miklavec
  1 sibling, 0 replies; 12+ messages in thread
From: Hans Hagen @ 2005-07-07 16:11 UTC (permalink / raw)
  Cc: Mojca Miklavec

Hans Hagen wrote:

> works ok here in acrobat 7
> 
> (acrobat has fuzzy ways of initializing js and widgets)

btw, such animations keep running whil teh doc is closes (70% cpu time !), so 
normally one should stop the similation (in js code) at closedocument time (can 
be an action).

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Re: Animations in ConTeXt
  2005-07-07 15:51     ` Hans Hagen
  2005-07-07 16:11       ` Hans Hagen
@ 2005-07-07 21:02       ` Mojca Miklavec
  2005-07-07 21:33         ` Hans Hagen
  1 sibling, 1 reply; 12+ messages in thread
From: Mojca Miklavec @ 2005-07-07 21:02 UTC (permalink / raw)
  Cc: mailing list for ConTeXt users

Hans Hagen wrote:
> Mojca Miklavec wrote:
> 
>> I don't get it. Examples (animations) on
>> http://www.fi.muni.cz/~xholecek/animations/ compile and work OK with
>> my TeX and Acrobat (Windows XP, Adobe Acrobat Professional 6.0.1).
>> However, the example below doesn't work on my computer.
>>
>> I replaced some lines below with:
>>
>> \starttext
>>   \placefigure [here] [fig:animation]
>>   {A simple \MetaFun\ animation,
>>   click \goto {here} [JS(Rotate_Star)] to start (or stop) or
>>   % this line was added as described in MetaFun manual
>>   click \goto {here} [JS(Walk_Field{vortex})] for next step}
>>   {\fieldstack [vortex]}
>> \stoptext
>> which results in the PDF file attached.
> 
> 
>> (old/buggy?) Acrobat/OS or because of problems in JavaScript?
> 
> 
> works ok here in acrobat 7
> 
> (acrobat has fuzzy ways of initializing js and widgets)

Yes, in the meantime I noticed that too. Acrobat 5 doesn't support those 
JS stuff at all, but the funny thing is that Acrobat 6 supports only a 
half of it. I was already running a continuous animation in Acrobat 6 
(the one mentioned above), however it was compiled from plain TeX and I 
don't know how to include the fields in the same way in ConTeXt and how 
to write the same JS code for them.

JS(Rotate_Star) didn't work in Acrobat 6, but I don't want to care about 
the bugs in Adobe products. They will never be removed (if ever) as soon 
as the bugs are removed from ConTeXt :)

Mojca

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Re: Animations in ConTeXt
  2005-07-07 21:02       ` Mojca Miklavec
@ 2005-07-07 21:33         ` Hans Hagen
  2005-07-08  6:02           ` luigi.scarso
  0 siblings, 1 reply; 12+ messages in thread
From: Hans Hagen @ 2005-07-07 21:33 UTC (permalink / raw)
  Cc: mailing list for ConTeXt users

[-- Attachment #1: Type: text/plain, Size: 1344 bytes --]

Mojca Miklavec wrote:

> Yes, in the meantime I noticed that too. Acrobat 5 doesn't support those 
> JS stuff at all, but the funny thing is that Acrobat 6 supports only a 
> half of it. I was already running a continuous animation in Acrobat 6 
> (the one mentioned above), however it was compiled from plain TeX and I 
> don't know how to include the fields in the same way in ConTeXt and how 
> to write the same JS code for them.

timers were added in version 6

> JS(Rotate_Star) didn't work in Acrobat 6, but I don't want to care about 
> the bugs in Adobe products. They will never be removed (if ever) as soon 
> as the bugs are removed from ConTeXt :)

currently in acrobat you can use catch to make sure that the document at least 
opens ok

here is the deal:

- i add the attached (a bit old and rusty) file to the distribution
- and you add an animation page to the wiki

(you probably recognize the result if you process it)

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------

[-- Attachment #2: pdfclock.tex --]
[-- Type: application/x-tex, Size: 3620 bytes --]

[-- Attachment #3: Type: text/plain, Size: 139 bytes --]

_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Re: Animations in ConTeXt
  2005-07-07 21:33         ` Hans Hagen
@ 2005-07-08  6:02           ` luigi.scarso
  0 siblings, 0 replies; 12+ messages in thread
From: luigi.scarso @ 2005-07-08  6:02 UTC (permalink / raw)


[a little off topic]

http://www.quiss.org/swftools/examples.html
(pdf -> swf; open new views if we think mp->pdf->swf driven by context..)

http://www.pragma-ade.com/dir/itdemos/internal/media/
(how to play mediashow.smi ? maybe
https://player.helixcommunity.org 
can help ?)

luigi

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Animations in ConTeXt
@ 2005-05-20 16:00 Richard Rascher-Friesenhausen
  0 siblings, 0 replies; 12+ messages in thread
From: Richard Rascher-Friesenhausen @ 2005-05-20 16:00 UTC (permalink / raw)


Hello list,

i have recently found the webpage 
      http://www.tug.org/texshowcase/
with a lot of astonishing TeX typesettings. Most of all, because i was looking 
for this, i was impressed by the animation possibilities of pdftex. See 
'LorenzAttractor.tex' in the 'Dynamic documents' section. It is a LaTeX 
implementation using a lot of JavaScript. Is something like this possible in 
ConTeXt?

I'm aware  of fieldstacks and step by step presentations. But i would like to 
generate 'pdf-movies', especially for mathematical animations using MetaPost 
as an graphical engine.

There exists also a 'solution' for plain TeX:   
                        http://www.fi.muni.cz/~xholecek/animations/
But i had no success in generating the pdf-files from the sources. No 
animation was shown. 

So again. Is it possible to write something like the above animation packages 
in ConTeXt (as a module)?

Thanks in advance
    richard rascher-friesenhausen


-- 

==============================================================================
Richard Rascher-Friesenhausen                
MeVis -- Centrum fuer Medizinische Diagnosesysteme und Visualisierung GmbH
Universitaetsallee 29
D-28359 Bremen

email: richard@mevis.de
www  : http://www.mevis.de/
fon  : +49 - 421 - 218 7707 (mevis)
fax  : +49 - 421 - 218 4236 (mevis)
==============================================================================

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2005-07-08  6:02 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-05-22 10:19 Animations in ConTeXt Richard Hirsch
2005-05-23 17:54 ` Willi Egger
2005-05-24 18:07   ` Mojca Miklavec
2005-05-25 15:32     ` Willi Egger
2005-07-07 15:51     ` Hans Hagen
2005-07-07 16:11       ` Hans Hagen
2005-07-07 21:02       ` Mojca Miklavec
2005-07-07 21:33         ` Hans Hagen
2005-07-08  6:02           ` luigi.scarso
2005-05-24 17:58 ` Mojca Miklavec
2005-05-24 21:52   ` Hans Hagen
  -- strict thread matches above, loose matches on Subject: below --
2005-05-20 16:00 Richard Rascher-Friesenhausen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).