Re: [R] drawing arrows with rgl

From: Duncan Murdoch <murdoch_at_stats.uwo.ca>
Date: Tue, 29 Jan 2008 18:37:12 -0500

On 1/29/2008 6:23 PM, Kasper Peeters wrote:
> Hi,
>
> I am looking for a package which allows me to draw arrows (cylinders
> with cones on them, basically) in 3d images produced with rgl. Is such
> a thing available?

The shapes3d demo in rgl draws cones. You could use the same ideas to draw cylinders.

Once you have instructions to draw one prototypical arrow, you can use the scale3d, translate3d and rotate3d functions to reshape it and move it.

I've never found such arrows very visually pleasing, but if you do find a way to draw nice ones, please post the code here.

Duncan Murdoch

>
> I did notice the 'compositions' package, which contains
> 'arrow3D'. However, it relies on 'tensorA', which fails to install on
> my machine with the error message copied below. If anyone can help me
> fix this problem, that would do the trick too.
>
> Best,
> Kasper
>
> ----------------
> trying URL 'http://www.sourcekeg.co.uk/cran/src/contrib/tensorA_0.31.tar.gz'
> Content type 'application/x-tar' length 45248 bytes
> opened URL
> ==================================================
> downloaded 44Kb
>
> * Installing *source* package 'tensorA' ...
> ** libs
> gcc -I/usr/lib/R/include -fPIC -g -O2 -c tensora.c -o tensora.o
> gcc -shared -o tensorA.so tensora.o -L/usr/lib/R/lib -lR
> ** R
> ** preparing package for lazy loading
> Error in gettext(domain, unlist(args)) : invalid 'domain' value
> Execution halted
> ERROR: lazy loading failed for package 'tensorA'
> ** Removing '/usr/local/lib/R/site-library/tensorA'
>
> The downloaded packages are in
> /tmp/RtmpikOKjt/downloaded_packages
> Warning message:
> installation of package 'tensorA' had non-zero exit status in: install.packages
> "tensorA")
>
> ______________________________________________
> R-help_at_r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Tue 29 Jan 2008 - 23:45:04 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 30 Jan 2008 - 01:30:09 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive