# 3d Triangle Maths

**URL:** <https://forum.kirupa.com/t/3d-triangle-maths/322289>\
**Category:** Uncategorized\
**Created:** [May 17, 2011, 9:06am UTC](https://forum.kirupa.com/t/3d-triangle-maths/322289 "2011-05-17T09:06:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![fikontrollet](https://avatars.discourse-cdn.com/v4/letter/f/35a633/32.png) [@fikontrollet](https://forum.kirupa.com/u/fikontrollet)\
**Post date:** [May 17, 2011, 9:06am UTC](https://forum.kirupa.com/t/3d-triangle-maths/322289/1 "2011-05-17T09:06:13Z")

</div>

Hey guys, anyone that could give me a hand with this?  
Height of Point\* §\* in Triangle _(V0, V1, V2)_:

This traces out “-66.66666666666667”;  
The result shouldn’t even be negative…  
Obviously somewhere something is wrong… Anyone that could be so kind and give me a hint of what it is?

```php

var N:Vector3D = new Vector3D(50, 150, -50); // Normal
var P:Vector3D = new Vector3D(100, 100, -100); // Point
var V0:Vector3D = new Vector3D(-150, 0, -150); // Vertice 0

trace( (N.x*(P.x-V0.x) + N.z*(P.z-V0.z))/-N.y + V0.y );

```
