From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/106923 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Jeong Dal Newsgroups: gmane.comp.tex.context Subject: animation using \startuseMPgraphic Date: Sun, 19 Apr 2020 14:08:46 +0900 Message-ID: <15AC49E5-BC89-4C19-A68E-E556DD202D3B@me.com> References: Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\)) Content-Type: multipart/mixed; boundary="===============8920476488486394194==" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="46362"; mail-complaints-to="usenet@ciao.gmane.io" To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Sun Apr 19 07:09:15 2020 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane-mx.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jQ2Cg-000BwA-Hz for gctc-ntg-context-518@m.gmane-mx.org; Sun, 19 Apr 2020 07:09:14 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id DB8E518330D; Sun, 19 Apr 2020 07:09:00 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id GzW7NlyQY1t1; Sun, 19 Apr 2020 07:08:59 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id E9883183310; Sun, 19 Apr 2020 07:08:59 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id E91A4183310 for ; Sun, 19 Apr 2020 07:08:58 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id QnYs_QJejuIG for ; Sun, 19 Apr 2020 07:08:57 +0200 (CEST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=17.58.6.41; helo=pv50p00im-zteg10011401.me.com; envelope-from=haksan@me.com; receiver= Original-Received: from pv50p00im-zteg10011401.me.com (pv50p00im-zteg10011401.me.com [17.58.6.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 8464E181F9A for ; Sun, 19 Apr 2020 07:08:57 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=me.com; s=1a1hai; t=1587272935; bh=H3mH2bYTMeBS/s2GomCmTiEFV5Qn+yPzg6vc3tMJ5FI=; h=From:Content-Type:Subject:Date:To:Message-Id; b=Romtzjyqt0wOHNkhTi5SRQb3twKPqZzk85hhsFmp0UQMQrKyjxwVC9X+qEI74fuFV hp3ffsKX7dHVaJliQJo3xvilBX5+oGgwl4gk5ueTfVdFbEeLeSVKwLuXYyK6dW+Y0e WJAb2O9+amXvlWsqYej6x+thYFf+YzdgNdqMyfy3MLFr9EoFEja5ItVk4ktqWRM+wU H34RVdfgeNTnYsErV4vXSqWjo/kqFto9NrlrZVcGHEtxR9fSFoaCZrNL56UKptG6nK jM32FdkF/SArxxb1JRwbFgGuaW+JoltQFCsgpALLoXjVMy2vDNMRZVYvprNZA29MP3 nvGZGbJb1KtPA== Original-Received: from [10.0.1.6] (unknown [222.232.154.22]) by pv50p00im-zteg10011401.me.com (Postfix) with ESMTPSA id 47A8C900412 for ; Sun, 19 Apr 2020 05:08:49 +0000 (UTC) In-Reply-To: X-Mailer: Apple Mail (2.3608.80.23.2.2) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138, 18.0.676 definitions=2020-04-18_10:2020-04-17, 2020-04-18 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=1 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 mlxscore=0 mlxlogscore=667 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-2002250000 definitions=main-2004190046 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.26 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: "ntg-context" Xref: news.gmane.io gmane.comp.tex.context:106923 Archived-At: --===============8920476488486394194== Content-Type: multipart/alternative; boundary="Apple-Mail=_F6F5332C-83D5-4B78-B266-A1A96C39B750" --Apple-Mail=_F6F5332C-83D5-4B78-B266-A1A96C39B750 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii Dear all, I am trying to make an animation using the animation module. But it draws 10 figures instead of creating animation. Is there anything I have to do more? Or, is there a better way to do this? Thank you for reading. Best regards, Dalyoung \startuseMPgraphic{inversionPoint}{n} vardef findPointD(expr C, Q, r) = numeric dist, ang; pair X, Y; dist := r**2/sqrt((xpart Q - xpart C)**2 + (ypart Q - ypart C)**2); ang := angle(Q - C); Y := C + dir(ang)*dist; Y enddef; numeric radius, now, move; pair A,B,C,P,Q; path p,q; radius := 2cm; C := origin; p := fullcircle scaled (2*radius); z[1] = point 6 of p; z[2] = point .8 of p; q := (1.5*z1 - .5*z2) -- (-.5z1 + 1.5*z2); %q := fullcircle scaled radius shifted (2cm, 1cm); draw p; draw q; %for i := 0 step 0.1 until 1: move := 0.1; now := move*\MPvar{n}; P := point now along q; Q := findPointD(C, P, radius); drawdot P; drawdot Q withcolor .625red; dotlabel.lft(textext("P"),P); dotlabel.rt(textext("Q"),Q) withcolor .625red; %endfor; \stopuseMPgraphic \usemodule[animation] \setupinteraction[state=start] \starttext %\startplacefigure[] \startanimation[menu=yes] \dorecurse{10}{ \useMPgraphic{inversionPoint}{n=\recurselevel} } \stopanimation %\stopplacefigure \stoptext --Apple-Mail=_F6F5332C-83D5-4B78-B266-A1A96C39B750 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii Dear = all,

I am trying to = make an animation using the animation module.
But = it draws 10 figures instead of creating animation.
Is= there anything I have to do more?
Or, is there a = better way to do this?

Thank you for reading.

Best regards,

Dalyoung


\startuseMPgraphic{inversionPoint}{n}
vardef findPointD(expr C, Q, r) =3D
numeric = dist, ang;
pair X, Y;
dist :=3D= r**2/sqrt((xpart Q - xpart C)**2 = + (ypart Q - ypart C)**2);
ang :=3D angle(Q - C);
Y :=3D C + dir(ang)*dist;
Y
enddef;
numeric radius, now, = move;
pair A,B,C,P,Q;
path = p,q;

radius :=3D 2cm;
C :=3D origin;
p :=3D = fullcircle scaled (2*radius);
z[1] = =3D point = 6 of p;
z[2] = =3D point = .8 of p;

q :=3D (1.5*z1 = - .5*z2) = -- = (-.5z1 = + 1.5*z2);
%q :=3D fullcircle scaled radius shifted (2cm, = 1cm);
draw p;
draw q;
%for i :=3D 0 step 0.1 until 1:
move :=3D= 0.1;
now :=3D = move*\MPvar{n};
P :=3D point now along = q;
Q :=3D findPointD(C, P, radius);
drawdot P;
drawdot Q withcolor .625red;
dotlabel.lft(textext("P"),P);
dotlabel.rt(textext("Q"),Q) = withcolor .625red;
%endfor;
\stopuseMPgraphic

\usemodule[animation]
\setupinteraction[state=3Dstart]

\starttext
%\startplacefigure[]
\startanimation[menu=3Dyes]
\dorecurse{10}{
\useMPgraphic{inversionPoint}{n=3D\recurselevel}
= }
= \stopanimation
%\stopplacefigure
\stoptext


= --Apple-Mail=_F6F5332C-83D5-4B78-B266-A1A96C39B750-- --===============8920476488486394194== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly9jb250ZXh0LmFhbmhldC5uZXQKYXJjaGl2ZSAgOiBodHRwczovL2JpdGJ1Y2tldC5v cmcvcGhnL2NvbnRleHQtbWlycm9yL2NvbW1pdHMvCndpa2kgICAgIDogaHR0cDovL2NvbnRleHRn YXJkZW4ubmV0Cl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCg== --===============8920476488486394194==--