U3D (embedded 3D objects)
Hello, is there support for .u3d files in ConTeXt available or planned? This would take advantage of Acrobat 7 support for these 3D data files. There is a LaTeX package (http:// www.tug.org/tex-archive/macros/latex/contrib/movie15/) that does that, and it even works on my Mac. Thanks, Matthias
Matthias Weber wrote:
Hello,
is there support for .u3d files in ConTeXt available or planned? This would take advantage of Acrobat 7 support for these 3D data files. There is a LaTeX package (http:// www.tug.org/tex-archive/macros/latex/contrib/movie15/) that does that, and it even works on my Mac.
(mime type controlled i assume that you refer to support for graphic formats that depend on specific plug-ins; contrary to the older support for movies, such features need a bit more, in particular a relationship between the part of the screen where the stuff is shown and the place where the resources are embedded and refered to. the framework for that has been present for a while now (was implemented right after 6 came out) but in practice only a fraction of the plugins / graphic formats work ok (for instance, smill based graphics/sequences are rather plug-in dependent and buggy); the mediashow stuff on the site and in the distributions implements this renderign) \definerenderingwindow [example] [width=320pt,height=150pt,frame=off, background=color,backgroundcolor=gray, openpageaction=StartCurrentRendering, closepageaction=NextPage]% StopCurrentRendering] \useexternalrendering[example-1][audio/mpeg] [eldorado.mp3] \useexternalrendering[example-2][audio/mpeg] [myst-12.mp3] \useexternalrendering[example-3][application/x-shockwave-flash][http://localhost/mb.swf] [auto] \useexternalrendering[example-4][application/x-shockwave-flash][celebration.swf] \useexternalrendering[example-5][video/quicktime] [p1000726.mov] \useexternalrendering[example-6][application/smil] [quadratic_map.smi] \def\renderingmenu[#1]% {\hbox {\setupbuttons[width=2.5em]% \button{\symbol[StartRendering]} [StartRendering{#1}]\enspace \button{\symbol[StopRendering]} [StopRendering{#1}]\enspace \button{\symbol[PauseRendering]} [PauseRendering{#1}]\enspace \button{\symbol[ResumeRendering]}[ResumeRendering{#1}]}} \renderingmenu[example-1]\blank \renderingmenu[example-2]\blank \renderingmenu[example-3]\blank \renderingmenu[example-4] \placefigure{A ShockWave}{\placerenderingwindow[example][example-4]} \page \renderingmenu[example-5] \placefigure{A Movie}{\placerenderingwindow[example][example-5]} \page \renderingmenu[example-6] \placefigure{A Smile}{\placerenderingwindow[example][example-6]} etc etc (see x-res-50 for other examples) much of the plugin behaviou can be tuned with key/values in pdf, but it is rather messy (kind of: the plugin provides this, so we need these and those keys): no clear consistent model is present); in order for me to provide more detailed support, i first need to cook up a more or less consistent control model (not too much pdf dependent) since whenever possible, i keep context's interface independent of the pdf way of doing things so, if you want more detailed support for this i need (1) proper conforming resources, and (2) a description of what is needed (which is not the same as a cut and paste from the pdf spec with all possible features) and (3) time and (4) motivation (i.e. it should be usable, used, etc etc;) implementing pdf related features just because it's in pdf is no longer a good motive since pdf specs/functionality keeps changing, esp in those areas it's rather instable ----------------------------------------------------------------- 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 -----------------------------------------------------------------
Hello Hans, thanks for the information. Here is where I am: I am using and talking about 3D objects all the time as part of my professional life, and it would be nice to be able to include them as part of PDF files both for presentations and class notes (which I do both in CoNTeXt). As with Acrobat 7, "one" can embed such 3D graphics in a PDF, Acrobat then shows (very much like with a movie) a surrounding box within which one can rotate, move scale the 3D image. I f available, I would replace most of my 3D graphics with 3D objects ("surface"). This is of course a rather specialized desire, I suppose. I can say that it does work, even on a Mac, I tried a LaTeX example. I don't know whether it works via a plug-in or is coded directly in Acrobat, I only know it works with Acrobat 7 without installing anything else. There is one problem though: None of my software or own code currently exports into the required format U3D. If support was already available within ConTeXt, I would be motivated to write some code so that I can export my 3D files to U3D. That not being the case, I think we let it rest here until we both have nothing better to do (...). Matthias On Jan 30, 2006, at 7:02 AM, Hans Hagen wrote:
Matthias Weber wrote:
Hello,
is there support for .u3d files in ConTeXt available or planned? This would take advantage of Acrobat 7 support for these 3D data files. There is a LaTeX package (http:// www.tug.org/tex-archive/macros/latex/contrib/movie15/) that does that, and it even works on my Mac.
(mime type controlled i assume that you refer to support for graphic formats that depend on specific plug-ins; contrary to the older support for movies, such features need a bit more, in particular a relationship between the part of the screen where the stuff is shown and the place where the resources are embedded and refered to. the framework for that has been present for a while now (was implemented right after 6 came out) but in practice only a fraction of the plugins / graphic formats work ok (for instance, smill based graphics/sequences are rather plug-in dependent and buggy); the mediashow stuff on the site and in the distributions implements this renderign)
\definerenderingwindow [example] [width=320pt,height=150pt,frame=off, background=color,backgroundcolor=gray, openpageaction=StartCurrentRendering, closepageaction=NextPage]% StopCurrentRendering]
\useexternalrendering[example-1][audio/mpeg] [eldorado.mp3] \useexternalrendering[example-2][audio/mpeg] [myst-12.mp3] \useexternalrendering[example-3][application/x-shockwave-flash] [http://localhost/mb.swf] [auto] \useexternalrendering[example-4][application/x-shockwave-flash] [celebration.swf] \useexternalrendering[example-5][video/quicktime] [p1000726.mov] \useexternalrendering[example-6][application/smil] [quadratic_map.smi]
\def\renderingmenu[#1]% {\hbox {\setupbuttons[width=2.5em]% \button{\symbol[StartRendering]} [StartRendering{#1}]\enspace \button{\symbol[StopRendering]} [StopRendering{#1}]\enspace \button{\symbol[PauseRendering]} [PauseRendering{#1}]\enspace \button{\symbol[ResumeRendering]}[ResumeRendering{#1}]}}
\renderingmenu[example-1]\blank \renderingmenu[example-2]\blank \renderingmenu[example-3]\blank \renderingmenu[example-4] \placefigure{A ShockWave} {\placerenderingwindow[example][example-4]} \page \renderingmenu[example-5] \placefigure{A Movie} {\placerenderingwindow[example][example-5]} \page \renderingmenu[example-6] \placefigure{A Smile} {\placerenderingwindow[example][example-6]}
etc etc
(see x-res-50 for other examples)
much of the plugin behaviou can be tuned with key/values in pdf, but it is rather messy (kind of: the plugin provides this, so we need these and those keys): no clear consistent model is present);
in order for me to provide more detailed support, i first need to cook up a more or less consistent control model (not too much pdf dependent) since whenever possible, i keep context's interface independent of the pdf way of doing things
so, if you want more detailed support for this i need (1) proper conforming resources, and (2) a description of what is needed (which is not the same as a cut and paste from the pdf spec with all possible features) and (3) time and (4) motivation (i.e. it should be usable, used, etc etc;)
implementing pdf related features just because it's in pdf is no longer a good motive since pdf specs/functionality keeps changing, esp in those areas it's rather instable
----------------------------------------------------------------- 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 -----------------------------------------------------------------
_______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Matthias Weber wrote:
I can say that it does work, even on a Mac, I tried a LaTeX example. I don't know whether it works via a plug-in or is coded directly in Acrobat, I only know it works with Acrobat 7 without installing anything else.
then it's probably in a format that has an associated plugin (on the os) can youn send me such a graphic? 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 -----------------------------------------------------------------
The files I played around with http://www.tug.org/tex-archive/macros/latex/contrib/movie15/ I downloaded the sty file and the files in the doc directory, then LaTeXed movie15.tex, and opened the created pdf with Acrobat 7. The last example in the pdf file is a rotatable cube, just click with the mouse on the image and start dragging. The TeX file uses a binary 3D data file dice.u3d, a text file with viewpoint coordinates (dice.vws), and a javascript setting light sources (dice.js). The other files in the doc directory are for other stuff in the package. Matthias On Jan 30, 2006, at 5:22 PM, Hans Hagen wrote:
Matthias Weber wrote:
I can say that it does work, even on a Mac, I tried a LaTeX example. I don't know whether it works via a plug-in or is coded directly in Acrobat, I only know it works with Acrobat 7 without installing anything else.
then it's probably in a format that has an associated plugin (on the os)
can youn send me such a graphic?
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 -----------------------------------------------------------------
_______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Matthias Weber wrote:
The files I played around with
http://www.tug.org/tex-archive/macros/latex/contrib/movie15/
I downloaded the sty file and the files in the doc directory, then LaTeXed movie15.tex, and opened the created pdf with Acrobat 7. The last example in the pdf file is a rotatable cube, just click with the mouse on the image and start dragging.
doesn't work here 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 -----------------------------------------------------------------
Can you expand? Doesn't it TeX, open, crash? I don't think it runs on Linux yet, but OS X and Windows should be supported. Matthias On Jan 31, 2006, at 5:27 AM, Hans Hagen wrote:
Matthias Weber wrote:
The files I played around with
http://www.tug.org/tex-archive/macros/latex/contrib/movie15/
I downloaded the sty file and the files in the doc directory, then LaTeXed movie15.tex, and opened the created pdf with Acrobat 7. The last example in the pdf file is a rotatable cube, just click with the mouse on the image and start dragging.
doesn't work here
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 -----------------------------------------------------------------
_______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Matthias Weber wrote:
Can you expand? Doesn't it TeX, open, crash?
well, i compiled my last latex doc somewhere in the mid 90's so i just took the pdf; (1) one instance stalled and made quicktime (latest version) segfault (2) another instance made acrobat drop dead
I don't think it runs on Linux yet, but OS X and Windows should be supported.
well, this is the first plug in then that runs on linux and not on windows -) 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 -----------------------------------------------------------------
The PDF in the movie15 crashes my Acrobat, too, but this might have been produced with some older version of something ---- I have put the one I made on OS X/TeXShop pdf at http://129.79.94.36/U3D/movie15.pdf (197 k) I can only say that it works with Acrobat 7.0.5 under OS X. Matthias On Jan 31, 2006, at 11:37 AM, Hans Hagen wrote:
Matthias Weber wrote:
Can you expand? Doesn't it TeX, open, crash?
well, i compiled my last latex doc somewhere in the mid 90's so i just took the pdf;
(1) one instance stalled and made quicktime (latest version) segfault (2) another instance made acrobat drop dead
I don't think it runs on Linux yet, but OS X and Windows should be supported.
well, this is the first plug in then that runs on linux and not on windows -)
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 -----------------------------------------------------------------
_______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Matthias Weber wrote:
The PDF in the movie15 crashes my Acrobat, too, but this might have been produced with some older version of something ----
I have put the one I made on OS X/TeXShop pdf at
the 3d thing works, the mpg (as expected) does not work 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 -----------------------------------------------------------------
Am 2006-01-31 um 17:46 schrieb Matthias Weber:
I can only say that it works with Acrobat 7.0.5 under OS X.
The same here. (It needed 2 pdflatex runs to be complete, but that's probably normal.) Greetlings from Lake Constance! Hraban --- http://www.fiee.net/texnique/ http://contextgarden.net http://www.cacert.org (I'm an assurer)
Matthias Weber wrote:
Can you expand? Doesn't it TeX, open, crash? I don't think it runs on Linux yet, but OS X and Windows should be supported.
I took a look at the pdf specs and it does not look too complex to support this; do you have a bunch of decent 3d example files? (Your own -) 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 -----------------------------------------------------------------
Hi all, What's new on this topic ? Since 3D is now supported by acroread linux, I would know if we can do that with ConTeXt... I'll take a look at https://sourceforge.net/projects/u3d in order to try to provide some samples... Renaud Hans Hagen a écrit :
Matthias Weber wrote:
Can you expand? Doesn't it TeX, open, crash? I don't think it runs on Linux yet, but OS X and Windows should be supported.
I took a look at the pdf specs and it does not look too complex to support this; do you have a bunch of decent 3d example files? (Your own -)
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 -----------------------------------------------------------------
_______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Renaud AUBIN wrote:
Hi all,
What's new on this topic ? Since 3D is now supported by acroread linux, I would know if we can do that with ConTeXt... I'll take a look at https://sourceforge.net/projects/u3d in order to try to provide some samples...
R in principle context can support those things (given that pdftex provides access to the relevant structures but we can always extend that)
as usual, the problem is ... specs ... and in thsi case sample 3d files so, if you want this and are willing to filter/provide the info ... 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 -----------------------------------------------------------------
Selon Hans Hagen
Renaud AUBIN wrote:
Hi all,
What's new on this topic ? Since 3D is now supported by acroread linux, I would know if we can do that with ConTeXt... I'll take a look at https://sourceforge.net/projects/u3d in order to try to provide some samples...
R in principle context can support those things (given that pdftex provides access to the relevant structures but we can always extend that)
as usual, the problem is ... specs ... and in thsi case sample 3d files
so, if you want this and are willing to filter/provide the info ...
I'm just working on this... I have succeeded in compiling U3D viewer/converter/etc. for linux... I'll try to provide some custom made sample from CAD program (windows or linux). Another interesting point (web3d response to Intel's u3d ;) ), http://www.web3d.org/news/releases/archives/2006/05/octaga_to_devel.php since blender supports x3d export. But we have to wait (a bit ?) for the plugin... Renaud
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 -----------------------------------------------------------------
_______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
aubin@nibua-r.org wrote:
I'm just working on this... I have succeeded in compiling U3D viewer/converter/etc. for linux... I'll try to provide some custom made sample from CAD program (windows or linux).
ok 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 -----------------------------------------------------------------
done see Re: [NTG-context] U3D (embedded 3D objects) 23.07.2006 02:27 Hans Hagen a écrit :
aubin@nibua-r.org wrote:
I'm just working on this... I have succeeded in compiling U3D viewer/converter/etc. for linux... I'll try to provide some custom made sample from CAD program (windows or linux).
ok
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 -----------------------------------------------------------------
_______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Hans Hagen a écrit :
Renaud AUBIN wrote:
Hi all,
What's new on this topic ? Since 3D is now supported by acroread linux, I would know if we can do that with ConTeXt... I'll take a look at https://sourceforge.net/projects/u3d in order to try to provide some samples...
R
in principle context can support those things (given that pdftex provides access to the relevant structures but we can always extend that)
as usual, the problem is ... specs ... and in thsi case sample 3d files
so, if you want this and are willing to filter/provide the info ...
Hans
Hi, I have converted a CATIA 3D model of mine to u3d (the nice Mitsubishi PA10 remodelled from a 2D drawing ;) ). For test, I have try to embed it to a LaTeX document with movie15, here is the source and the result http://renojrl.lrv.uvsq.fr/testbed/u3d/pa10-movie15.tgz (I have to get a better understanding of the views defs but it's not the main problem) Maybe this package and its doc can be a good startpoint ? Renaud
Renaud AUBIN wrote:
I have converted a CATIA 3D model of mine to u3d (the nice Mitsubishi PA10 remodelled from a 2D drawing ;) ). For test, I have try to embed it to a LaTeX document with movie15, here is the source and the result http://renojrl.lrv.uvsq.fr/testbed/u3d/pa10-movie15.tgz (I have to get a better understanding of the views defs but it's not the main problem)
Maybe this package and its doc can be a good startpoint ?
my guess is that trying to reverse engineer latex code will cost me more time that doing it directly the context way; the only thing that i need is the relevant annotation specs (someplace in the pdf manual) (in context such code ends up in the drivers and it needs to work well with the more complex annot stuff) 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 -----------------------------------------------------------------
Hans Hagen a écrit :
my guess is that trying to reverse engineer latex code will cost me more time that doing it directly the context way; the only thing that i need is the relevant annotation specs (someplace in the pdf manual)
(in context such code ends up in the drivers and it needs to work well with the more complex annot stuff)
Hans
See page 747 of PDFReference.pdf (1.6) Should I use \pdfannot ? I've never done that before so can you link me to an example (of the ConTeXt way) ? Renaud
Renaud AUBIN wrote:
Hans Hagen a écrit :
my guess is that trying to reverse engineer latex code will cost me more time that doing it directly the context way; the only thing that i need is the relevant annotation specs (someplace in the pdf manual)
(in context such code ends up in the drivers and it needs to work well with the more complex annot stuff)
Hans
See page 747 of PDFReference.pdf (1.6)
Should I use \pdfannot ? I've never done that before so can you link me to an example (of the ConTeXt way) ?
indeed pdfannot is what we need; however, the first thing is to figure out what kind of control we want (probably best from within javascript); in your sampe i see pretty raw pdf code in the key/val pairs, which is something alien to context - what features make sense - what features do we expect to be stable 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 -----------------------------------------------------------------
Hans Hagen a écrit :
indeed pdfannot is what we need; however, the first thing is to figure out what kind of control we want (probably best from within javascript); in your sampe i see pretty raw pdf code in the key/val pairs, which is something alien to context
- what features make sense - what features do we expect to be stable
Hans
Hi Hans, At first time, we can try to embed the u3d data as a "stream" by setting up the recquired (not the optional) keys (Subtype, 3DD) + 3DI at true to obtain an interactive 3D model without any js programming... With 3DI at true, I assume we can verify if the "3D artwork" is correctly parsed and rendered... Then, when can go to javascript to include setups of (mainly): - camera-to-world transformation matrix - artwork-to-world transformation matrix - background color settings I have to learn about pdfmark and pdfannot... Sorry if these remarks calls obvious answer... Renaud
Hans Hagen a écrit :
indeed pdfannot is what we need; however, the first thing is to figure out what kind of control we want (probably best from within javascript); in your sampe i see pretty raw pdf code in the key/val pairs, which is something alien to context
- what features make sense - what features do we expect to be stable
Hans
How to do that in the ConTeXt way ? ;) I have read spec-tpd.tex but didn't know much... Take care of the heart attack.... (I've done it the rookie way, reversed from movie15) \starttext \xdef\uthreedfilename{pa10} \pdfobj {<>}% \pdfrefobj\pdflastobj% % \pdfobj {<<% /MS/M% define the view as C2W matrix /CO 1200% orbital radius /P \the\pdflastobj\space 0 R% /C2W [-1.0 0.0 0.0 0.0 -1.0 0.0 0.0 0.0 1.0 0.000000000000000000 -600.000000000000000000 -3200.000000000000000000]% /XN(Default)% name of the view appearing in the drop down list /BG<>% >>}\pdfrefobj\pdflastobj% \xdef\defaultview{/3DV << /N \the\pdflastobj\space 0 R >>} \pdfobj stream % attr {% /Subtype/U3D/VA [\the\pdflastobj\space0 R] /DV/F% }% file {\uthreedfilename.u3d}% \pdfrefobj\pdflastobj% \xdef\iiidstream{\the\pdflastobj} \pdfobj stream {}\pdfrefobj\pdflastobj% \xdef\apdict{/AP << /N \the\pdflastobj\space 0 R >>} \pdfannot width 200pt height 200pt depth 200pt {% don't know how to deal with w,h and d !!! /Subtype/3D% /F 4% we cannot put F 5 here; bug in Reader; 3D annot would be /T (\uthreedfilename.u3d)% disabled even if plugin were available /Contents (3D Object (model/u3d))% mime type /NM (pa10)% label /P 0 0 R% \apdict% \defaultview% /3DI true% /3DD \iiidstream\space 0 R% 3D stream object /3DA << /A/PV/AIS/I/D/PI/DIS/I >>% }% \stoptext
Renaud AUBIN a écrit :
How to do that in the ConTeXt way ? ;) I have read spec-tpd.tex but didn't know much...
Take care of the heart attack.... (I've done it the rookie way, reversed from movie15)
\starttext
\xdef\uthreedfilename{pa10}
\pdfobj {<>}% \pdfrefobj\pdflastobj% % \pdfobj {<<% /MS/M% define the view as C2W matrix /CO 1200% orbital radius /P \the\pdflastobj\space 0 R% /C2W [-1.0 0.0 0.0 0.0 -1.0 0.0 0.0 0.0 1.0 0.000000000000000000 -600.000000000000000000 -3200.000000000000000000]% /XN(Default)% name of the view appearing in the drop down list /BG<>% >>}\pdfrefobj\pdflastobj% \xdef\defaultview{/3DV << /N \the\pdflastobj\space 0 R >>}
We need to be able to define some views... Variables are in facts CO, C2W, XN and BG needs to be annotation-wide... I need more time to manage coordinates possibilities...
\pdfobj stream % attr {% /Subtype/U3D/VA [\the\pdflastobj\space0 R] /DV/F% }% file {\uthreedfilename.u3d}% \pdfrefobj\pdflastobj% \xdef\iiidstream{\the\pdflastobj}
"pretty raw pdf code in the key/val pairs, which is something alien to context" ;)
\pdfobj stream {}\pdfrefobj\pdflastobj% \xdef\apdict{/AP << /N \the\pdflastobj\space 0 R >>}
\pdfannot width 200pt height 200pt depth 200pt {% don't know how to deal with w,h and d !!! /Subtype/3D% /F 4% we cannot put F 5 here; bug in Reader; 3D annot would be /T (\uthreedfilename.u3d)% disabled even if plugin were available /Contents (3D Object (model/u3d))% mime type /NM (pa10)% label /P 0 0 R% \apdict% \defaultview% /3DI true% /3DD \iiidstream\space 0 R% 3D stream object /3DA << /A/PV/AIS/I/D/PI/DIS/I >>% }%
Variables here are mainly 3DI, NM, mime type ?
\stoptext
------------------------------------------------------------------------
_______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Hi Matthias, Hans, This kind of features is very interesting for me. Unfortunately, I've LaTeXed movie15 and it doesn't work here (texlive2005 on linux). Since, I'm a linuxian, I didn't have advanced plugins with my acrobat reader (7.0.5)... Anyway, if this feature can be implemented with ConTeXt and can work with linux, it will surely be very usefull to me ;-) (The Linux release of Acrobat 7.0.5 supports now javascript animation) Renaud Matthias Weber a écrit :
The files I played around with
http://www.tug.org/tex-archive/macros/latex/contrib/movie15/
I downloaded the sty file and the files in the doc directory, then LaTeXed movie15.tex, and opened the created pdf with Acrobat 7. The last example in the pdf file is a rotatable cube, just click with the mouse on the image and start dragging.
The TeX file uses a binary 3D data file dice.u3d, a text file with viewpoint coordinates (dice.vws), and a javascript setting light sources (dice.js). The other files in the doc directory are for other stuff in the package.
Matthias
On Jan 30, 2006, at 5:22 PM, Hans Hagen wrote:
Matthias Weber wrote:
I can say that it does work, even on a Mac, I tried a LaTeX example. I don't know whether it works via a plug-in or is coded directly in Acrobat, I only know it works with Acrobat 7 without installing anything else.
then it's probably in a format that has an associated plugin (on the os)
can youn send me such a graphic?
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 -----------------------------------------------------------------
_______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
_______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
participants (5)
-
aubin@nibua-r.org
-
Hans Hagen
-
Henning Hraban Ramm
-
Matthias Weber
-
Renaud AUBIN