|
From: Alessandro S. <asa...@ju...> - 2005-06-16 14:32:30
|
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I attach the perspective patch for 4.1 i made some days ago but on a
not so recent cvs snapshot. I did nothing more than applying the 4.0
patch by Andras Barta manually because it had no context. sorry i have
really no time to test it on the current cvs... above all i have no
cvs access from here, as the port is blocked.
The only point which is obscure to me is this chunk of util3d.c i
hacked with no knowledge of what i was doing (because of the
introduction of the define WITH_IMAGE in 4.1):
@@ -1029,6 +1033,15 @@
if (w == 0)
w = 1e-5;
+#ifdef PERSPECTIVE
+#ifdef WITH_IMAGE
+ *xt = ((res[0] * xscaler / w) + xmiddle) *
perspective_eye_distance /
(perspective_eye_distance+perspective_graph_distance-res[2])) + xmiddle);
+ *yt = ((res[1] * yscaler / w) + ymiddle) *
perspective_eye_distance /
(perspective_eye_distance+perspective_graph_distance-res[2])) + ymiddle);
+#else
+ *xt = (unsigned int) (((res[0] * xscaler / w) *
perspective_eye_distance /
(perspective_eye_distance+perspective_graph_distance-res[2])) + xmiddle);
+ *yt = (unsigned int) (((res[1] * yscaler / w) *
perspective_eye_distance /
(perspective_eye_distance+perspective_graph_distance-res[2])) + ymiddle);
+#endif
+#else
#ifdef WITH_IMAGE
*xt = ((res[0] * xscaler / w) + xmiddle);
*yt = ((res[1] * yscaler / w) + ymiddle);
@@ -1036,6 +1049,8 @@
*xt = (unsigned int) ((res[0] * xscaler / w) + xmiddle);
*yt = (unsigned int) ((res[1] * yscaler / w) + ymiddle);
#endif
+#endif
+
}
#endif /* REPLICATE_CODE_FOR_BACKWARD_COMPATIBLE_ROUNDING */
i help this can help, but please if there's any problem with that I
have unfortunately no time until the 23rd... as i'm really in a shit
crick and without paddles.
also, i have a request for a small feature: i'd like to have an
assionometric view switch rather than having to set a huge distance
for the eye as in this minimalistic patch...
cheers and thank you for your great work, gnuplot is always better and
better
alessandro salvatori
Hans-Bernhard Broeker wrote:
> Christopher John Muller wrote:
>
>> Is there an easy way that the viewing point and general direction
>> can be
>> specified,
>
>
> Not with any existing version. There's a patch that enables point
> perspective, IIRC, but guess even that won't discard data behind the
> viewer.
>
>
> -------------------------------------------------------
> SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
> from IBM. Find simple to follow Roadmaps, straightforward articles,
> informative Webcasts and more! Get everything you need to get up to
> speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
> _______________________________________________
> Gnuplot-info mailing list
> Gnu...@li...
> https://lists.sourceforge.net/lists/listinfo/gnuplot-info
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1-ecc0.1.6 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFCsYT7zvGMPC6Aeb4RAmaGAKCEgGILKX5p3TohFolykgsjT/I/2gCeOSnS
Cjj6yUJjk1qRkDhotEWSy5U=
=fgaL
-----END PGP SIGNATURE-----
|