Re: [R] convert deldir$delsgs to a X3D IndexedTriangleSet

2012-07-20 Thread Rolf Turner

On 19/07/12 20:40, Erdal Karaca wrote:
Oh, I dont want anyone to do anything for me. I am just asking for 
hints/infos to be able to do it myself...

I was hoping that someone has already done this...
But anyways, I will post my solution once I have succeeded...


If you haven't already looked at it, you may find it helpful to experiment
with the "triang.list()" function and the "z" argument to "deldir()".

If I understand correctly what you are after, the output of triang.list()
may go some way toward providing it.

cheers,

Rolf Turner

__
R-help@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.


Re: [R] convert deldir$delsgs to a X3D IndexedTriangleSet

2012-07-20 Thread Erdal Karaca
I have managed to use the tripack package which is a bit simpler to use
(for me) and performs better (timely)...

##
# inputFile format: x y z
inputFile <- "d:\\inputfile.xyz.txt"

# output file will contain a x3d scene embedded in a html file to be viewed
in a browser supporting WebGL/X3DOM
outputFile <- "d:\\scene.x3d.html"

library(tripack)
points <- read.table( inputFile )
mesh <- tri.mesh(x, y)
tris <- triangles(mesh)
nodes <- cbind(tris[,1], tris[,2], tris[,3])

write("



",
file=outputFile, append=TRUE)

##

2012/7/20 Rolf Turner 

> On 19/07/12 20:40, Erdal Karaca wrote:
>
>> Oh, I dont want anyone to do anything for me. I am just asking for
>> hints/infos to be able to do it myself...
>> I was hoping that someone has already done this...
>> But anyways, I will post my solution once I have succeeded...
>>
>
> If you haven't already looked at it, you may find it helpful to experiment
> with the "triang.list()" function and the "z" argument to "deldir()".
>
> If I understand correctly what you are after, the output of triang.list()
> may go some way toward providing it.
>
> cheers,
>
> Rolf Turner
>

[[alternative HTML version deleted]]

__
R-help@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.


Re: [R] convert deldir$delsgs to a X3D IndexedTriangleSet

2012-07-19 Thread Erdal Karaca
 Oh, I dont want anyone to do anything for me. I am just asking for
hints/infos to be able to do it myself...
I was hoping that someone has already done this...
But anyways, I will post my solution once I have succeeded...

Thanks for the support!


2012/7/19 Rolf Turner 

>  On 19/07/12 18:36, Erdal Karaca wrote:
>
> Oh, sorry: X3D is an interchange format for 3D scenes (s [1])...
>  X3D's IndexedTriangleSet is a visual component to describe a complex
> figure to be visualized by triangles (s. [2])
>
>  I would like to triangulate a pointset (2.5D DEM consisting of xy coords
> and height) using deldir and convert the result back to a
> IndexedTriangelSet to visualize in a X3D browser.
>
>  [1] http://en.wikipedia.org/wiki/X3D
> [2]
> http://www.web3d.org/files/specifications/19775-1/V3.2/Part01/components/rendering.html#IndexedTriangleSet
>
> 2012/7/19 Rolf Turner 
>
>> On 19/07/12 01:13, Erdal Karaca wrote:
>>
>>> Anyone knows how to convert a deldir$delsgs to a X3D IndexedTriangleSet?
>>> Are there already any functions/packages?
>>>
>>>
>>  If I knew WTF a "X3D IndexedTriangleSet" was, I might be able
>> to help you.  To quote Prof. Ripley,  "R is lacking a mind_read()
>> function!"
>>
>
> This seems to be an X3D question rather than an R question.  I can,
> and would be willing to, write code to convert output from deldir()
> into an R object of any appropriate form.  I am not willing to write
> code to output an R object to a text file in a format amenable
> for use by X3D.  Which seems to be what you want.
>
> I don't think that would be too hard to do, for someone familiar
> with the X3D protocol --- just use a lot of calls to cat() perhaps
> --- but it's not my job and I have other things to do with my time.
>
> cheers,
>
> Rolf Turner
>
> P. S. If you just want code to convert deldir output to a convenient form
> of *R object*, let me know clear and precise specifications of what you
> want the form to be --- with an *example* of an object of the appropriate
> form (use dput()) --- and I'll see what I can do.
>
> R. T.
>

[[alternative HTML version deleted]]

__
R-help@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.


Re: [R] convert deldir$delsgs to a X3D IndexedTriangleSet

2012-07-19 Thread Rolf Turner
On 19/07/12 18:36, Erdal Karaca wrote:
> Oh, sorry: X3D is an interchange format for 3D scenes (s [1])...
> X3D's IndexedTriangleSet is a visual component to describe a complex 
> figure to be visualized by triangles (s. [2])
>
> I would like to triangulate a pointset (2.5D DEM consisting of xy 
> coords and height) using deldir and convert the result back to a 
> IndexedTriangelSet to visualize in a X3D browser.
>
> [1] http://en.wikipedia.org/wiki/X3D
> [2] 
> http://www.web3d.org/files/specifications/19775-1/V3.2/Part01/components/rendering.html#IndexedTriangleSet
>
> 2012/7/19 Rolf Turner  >
>
> On 19/07/12 01:13, Erdal Karaca wrote:
>
> Anyone knows how to convert a deldir$delsgs to a X3D
> IndexedTriangleSet?
> Are there already any functions/packages?
>
>
> If I knew WTF a "X3D IndexedTriangleSet" was, I might be able
> to help you.  To quote Prof. Ripley,  "R is lacking a mind_read()
> function!"
>

This seems to be an X3D question rather than an R question.  I can,
and would be willing to, write code to convert output from deldir()
into an R object of any appropriate form.  I am not willing to write
code to output an R object to a text file in a format amenable
for use by X3D.  Which seems to be what you want.

I don't think that would be too hard to do, for someone familiar
with the X3D protocol --- just use a lot of calls to cat() perhaps
--- but it's not my job and I have other things to do with my time.

 cheers,

 Rolf Turner

P. S. If you just want code to convert deldir output to a convenient form
of *R object*, let me know clear and precise specifications of what you
want the form to be --- with an *example* of an object of the appropriate
form (use dput()) --- and I'll see what I can do.

 R. T.

[[alternative HTML version deleted]]

__
R-help@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.


Re: [R] convert deldir$delsgs to a X3D IndexedTriangleSet

2012-07-19 Thread Erdal Karaca
Oh, sorry: X3D is an interchange format for 3D scenes (s [1])...
X3D's IndexedTriangleSet is a visual component to describe a complex figure
to be visualized by triangles (s. [2])

I would like to triangulate a pointset (2.5D DEM consisting of xy coords
and height) using deldir and convert the result back to a
IndexedTriangelSet to visualize in a X3D browser.

[1] http://en.wikipedia.org/wiki/X3D
[2]
http://www.web3d.org/files/specifications/19775-1/V3.2/Part01/components/rendering.html#IndexedTriangleSet

2012/7/19 Rolf Turner 

> On 19/07/12 01:13, Erdal Karaca wrote:
>
>> Anyone knows how to convert a deldir$delsgs to a X3D IndexedTriangleSet?
>> Are there already any functions/packages?
>>
>>
> If I knew WTF a "X3D IndexedTriangleSet" was, I might be able
> to help you.  To quote Prof. Ripley,  "R is lacking a mind_read()
> function!"
>
> cheers,
>
> Rolf Turner
>
>

[[alternative HTML version deleted]]

__
R-help@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.