From 41a7c92552af33f5da0957069fe36bb46f76ed00 Mon Sep 17 00:00:00 2001 From: miguel <31931809+miguelvaca@users.noreply.github.com> Date: Sat, 22 Apr 2023 12:51:21 +1000 Subject: [PATCH] Update antenna.html --- antenna.html | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/antenna.html b/antenna.html index 81f6f30..81babc8 100644 --- a/antenna.html +++ b/antenna.html @@ -121,7 +121,7 @@ }, 'Inverted L' : { 'vertex' : [ - [0.00, 0.00, 0.00], [0.00, 0.35, 0.00], [0.00, 0.35, -0.20] + [0.00, 0.00, 0.00], [0.00, 0.35, 0.00], [0.00, 0.35, 0.20] ], 'wires' : [ [0, 1, 2] @@ -594,7 +594,7 @@ init(); animate(); - + // Setup the Three.js boiler-plate code to setup the screen/window, add controls, and EM-solve and // display the default antenna. function init() { @@ -706,13 +706,17 @@ ant.setAntennaType(value); console.log(ant.getWires()); + // Solve the z-matrix: ant.calculateZMatrix(); console.log('Z', ant.Z); + var admittance = math.inv(ant.Z); console.log('S', admittance); + var V = ant.createVoltageVector(); console.log('V', V); + var I = math.multiply(admittance, V); console.log(I);