To get 6 inputs from users, you can use the prompt function in JavaScript. Here's an example of how you can prompt the user for 6 inputs:
index.tsx613 chars23 linesOnce you have the user inputs stored as voltagePhasors and currentPhasors, you can use a plotting library like Chart.js to plot the phasors. Here's an example of how to create a scatter plot using Chart.js:
index.tsx827 chars35 linesTo find the sequence components of the phasors, you can use the formulas for positive, negative, and zero sequence components in power systems. Here's an example of how to calculate the sequence components using JavaScript:
index.tsx1484 chars64 linesNote: In the above example, I have used the complex function to represent complex numbers and polarForm function to convert complex numbers to polar form. These functions are not built-in JavaScript functions, so you need to define them yourself.
gistlibby LogSnag