将webGL html转换为SVG [英] Converting webGL html to SVG

查看:216
本文介绍了将webGL html转换为SVG的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用带有misc3d和rpanel库的R在webGL中创建3d图像.然后,我需要通过Latex将图像嵌入到PDF中.

I am using R, with the misc3d and rpanel libraries, to create a 3d image in webGL. I then need to embed the image into a PDF via Latex.

3d图像呈现良好并且看起来很棒-但我想我需要将webGL HTML文件转换为SVG或 可以嵌入到Latex中的其他矢量图形文件.

The 3d image renders fine and looks great - but I'm thinking I need to convert the webGL HTML file into an SVG or some other kind of vector graphics file which can be embedded in Latex.

关于如何实现此目标的任何建议?

Any suggestions on how to accomplish this?

推荐答案

是否存在您不能使用rgl软件包的原因(我不太熟悉rpanel,但是我很确定misc3d最初设计为与rgl结合使用,并使用rgl.postscript(...,fmt="pdf")直接导出为PDF? rgl.postscript还提供了SVG选项.有时结果有时会有点怪(它使用的底层软件包并不完全可靠),但这绝对是阻力最小的过去.

Is there a reason you can't use the rgl package instead (I'm not really familiar with rpanel, but I'm pretty sure that misc3d was originally design to work in conjunction with rgl) and use rgl.postscript(...,fmt="pdf") to export directly to PDF? rgl.postscript also offers an SVG option. The results are admittedly a little wonky sometimes (the underlying package it uses isn't completely reliable), but it's definitely the past of least resistance.

此外,我还没有亲自尝试过,但是我认为以下文章提供了有关将rgl图像以完整的,可旋转的荣耀嵌入PDF的一些信息:Levine,Richard A.,Luke Tierney,Hadley Wickham,埃里克·桑普森(Eric Sampson),黛安·库克(Dianne Cook)和大卫·范·戴克(David A.van Dyk). 2010年.在JCGS中发布动画,3D可视化和电影."计算和图形统计杂志19(1)(一月):1-2. doi:10.1198/jcgs.2010.191ed. http://amstat.tandfonline.com/doi/abs/10.1198/jcgs. 2010.191ed .

Also, I haven't tried it out myself, but I think the following article gives some information about embedding rgl images in their full, rotatable glory into PDFs: Levine, Richard A., Luke Tierney, Hadley Wickham, Eric Sampson, Dianne Cook, and David A. van Dyk. 2010. "Editorial: Publishing Animations, 3D Visualizations, and Movies in JCGS." Journal of Computational and Graphical Statistics 19 (1) (January): 1–2. doi:10.1198/jcgs.2010.191ed. http://amstat.tandfonline.com/doi/abs/10.1198/jcgs.2010.191ed.

这篇关于将webGL html转换为SVG的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆