Hi,
I always thought that d.nviz was a great idea which was never really
finished. Any thoughts on the viability of rewriting it (probably from
scratch) for use as a control script for animations via nviz_cmd, or...?
ideas? comments?
Hamish
Hi,
I always thought that d.nviz was a great idea which was never really
finished. Any thoughts on the viability of rewriting it (probably from
scratch) for use as a control script for animations via nviz_cmd, or...?
ideas? comments?
Hamish
Hamish ha scritto:
I always thought that d.nviz was a great idea which was never really
finished. Any thoughts on the viability of rewriting it (probably from
scratch) for use as a control script for animations via nviz_cmd, or...?ideas? comments?
I think connecting to some existing 3D visualization tool is a more
feasible route than rewriting from scratch.
All the best.
pc
--
Paolo Cavallini, see: * http://www.faunalia.it/pc *
On Wednesday 10 December 2008, Paolo Cavallini wrote:
Hamish ha scritto:
> I always thought that d.nviz was a great idea which was never really
> finished. Any thoughts on the viability of rewriting it (probably from
> scratch) for use as a control script for animations via nviz_cmd, or...?
>
> ideas? comments?I think connecting to some existing 3D visualization tool is a more
feasible route than rewriting from scratch.
All the best.
pc
POVRAY, ParaView, etc. ?
2c
dylan
--
Dylan Beaudette
Soil Resource Laboratory
http://casoilresource.lawr.ucdavis.edu/
University of California at Davis
530.754.7341
> Hamish ha scritto:
> > I always thought that d.nviz was a great idea which was never really
> > finished. Any thoughts on the viability of rewriting it (probably
> > from scratch) for use as a control script for animations via nviz_cmd,
....
> I think connecting to some existing 3D visualization tool is a more
> feasible route than rewriting from scratch.POVRAY, ParaView, etc. ?
I'm just talking about the module which sets up a camera angle track from
a vector map or interactive GUI clicking. Nothing terribly complex.
It's just nviz_cmd in a loop.
Hamish
On Fri, 2008-12-12 at 00:59 -0800, Hamish wrote:
> > Hamish ha scritto:
> > > I always thought that d.nviz was a great idea which was never really
> > > finished. Any thoughts on the viability of rewriting it (probably
> > > from scratch) for use as a control script for animations via nviz_cmd,
....
> > I think connecting to some existing 3D visualization tool is a more
> > feasible route than rewriting from scratch.
>
> POVRAY, ParaView, etc. ?I'm just talking about the module which sets up a camera angle track from
a vector map or interactive GUI clicking. Nothing terribly complex.
It's just nviz_cmd in a loop.
Hamish,
I would suggest going to something simple like XML. This would hopefully
make it portable for future versions. You could for example have ...
<?xml version="1.0"?>
<xml_nv_state>
<nv_view_real>
<nv_from_real_x>413180.628200</nv_from_real_x>
<nv_from_real_y>6007389.738964</nv_from_real_y>
<nv_from_real_z>61.965817</nv_from_real_z>
<nv_to_real_x>412651.775378</nv_to_real_x>
<nv_to_real_y>6007238.693630</nv_to_real_y>
<nv_to_real_z>-21.584829</nv_to_real_z>
</nv_view_real>
<nv_cplane_pos>
<nv_cplane_x>412651.775378</nv_cplane_x>
<nv_cplane_y>6007238.693630</nv_cplane_y>
<nv_cplane_tilt>0.0</nv_cplane_tilt>
<nv_cplane_rotate>344.060161</nv_cplane_rotate>
</nv_cplane_pos>
<nv_add_keyframe>
<key_time>0.538949</key_time>
</nv_add_keyframe>
</xml_nv_state>
This would set one keyframe with a cutting plane. At the nviz (ogsf) end
of it you take the position tags (nv_view_real) and call ...
GS_set_infocus();
GS_set_focus_real(pos); /* pos is nv_to_real */
GS_moveto_real(pos); /* pos is nv_from_real */
The cutting plane is a little trickier but something like ...
GS_set_cplane_trans(0, trans_x, trans_y, 0.0); /* where trans x & y are
derived from nv_cplane_x & nv_cplane_y */
GS_set_cplane_rot(0, 0.0, tilt, rotate);
and finally add the key time with ...
GK_add_key(keytime, KF_ALL_MASK, 1, 0.0);
.........
This format could also be used for the state file.
Hope this helps.
--
Bob
_______________________________________________
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev