POV-Ray : Newsgroups : povray.off-topic : Heightfield modification : Re: Heightfield modification Server Time
8 Jul 2024 08:29:07 EDT (-0400)
  Re: Heightfield modification  
From: Le Forgeron
Date: 16 Aug 2015 14:34:26
Message: <55d0d7b2$1@news.povray.org>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Le 16/08/2015 18:21, Mike Horvath a écrit :
> How do I calculate the slope of a 3D triangle with respect to the
> ground plane? And I need a non-POVray solution. Thanks.
> 
> Mike

basic 3x3 matrix of delta, in height field.
You get 8 products ( assume a 3x3 grid, numbered clockwise around the
center cell, of vectors from center cell to border cell: 1-c-2, 2-c-3,
...up to 8-c-1 ).

The projection on the plane of each products is 45°, so the sum of the
8 values gives you a criteria to detect a relative null curvature.

(there is the true flat situation, and the monkey saddle, but for the
central point, all of them are of flat at center).


Now, if you have a true triangle, it's another matter, just compute
the normal and normalize it, then project on the vertical axis and
check the length of the projection.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iJwEAQEIAAYFAlXQ17IACgkQhKAm8mTpkW117wP9Fa2lWNrXLdfg2bU5zT6Fq5HX
aUwL5j/M7N5v9nKGPJAQwwLncb3R0Uzr0kZQS4s18g+JYsdnaovj2eZd+8QfChNd
gpXunDXsvdva1WZTGPjCmkXjVakdKre79MwjShQoKvhjSOHCKR13dnpTILExTwsm
EQHjBpCJ80RFk9rFrQI=
=qiQo
-----END PGP SIGNATURE-----


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.