View quadrilateralareas.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def square(side): | |
return side ** 2 | |
def rectangle(width, height): | |
return width * height |
View means.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import math | |
import numpy as np | |
def main(): | |
print("--------------------------------") | |
print("| codedrome.com |") | |
print("| Geometric and Harmonic Means |") | |
print("--------------------------------\n") |
View trigonometrymathsjs.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.onload = function() | |
{ | |
let hypotenuse = 0; | |
let adjacent = 0; | |
let opposite = 0; | |
let anglerad = 0; | |
anglerad = 0.523598775; | |
opposite = 5; | |
writeToConsole(`angle = ${rad2deg(anglerad)}°<br />`); |
View app.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict" | |
window.onload = function() | |
{ | |
arc(); | |
// pieSlice(); | |
// pieChart(); |
View svgarcandpieslice.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict" | |
function drawArc(settings) | |
{ | |
let d = ""; | |
const firstCircumferenceX = settings.centreX + settings.radius * Math.cos(settings.startAngleRadians); | |
const firstCircumferenceY = settings.centreY + settings.radius * Math.sin(settings.startAngleRadians); | |
const secondCircumferenceX = settings.centreX + settings.radius * Math.cos(settings.startAngleRadians + settings.sweepAngleRadians); |
View svgarcandpieslice.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8"/> | |
<title>SVG Arc and Pie Slice</title> | |
</head> | |
</body> |
View parametricequationspage.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict" | |
window.onload = function() | |
{ | |
const plotter = new ParametricEquationsPlotter(); | |
const pe = ParametricEquations.circle; | |
// const pe = ParametricEquations.ellipse; | |
// const pe = ParametricEquations.cardioid; | |
// const pe = ParametricEquations.spiral; |
View parametricequations.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const ParametricEquations = | |
{ | |
circle: | |
{ | |
xFunction: function (t) {return Math.cos(t)}, | |
yFunction: function (t) {return Math.sin(t)}, | |
zFunction: function (t) {return 0}, | |
tRange: {start: 0, end: 2 * Math.PI}, | |
tStep: Math.PI / 32, | |
colour: "#FF0000" |
View parametricequationsplotter.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ParametricEquationsPlotter | |
{ | |
constructor() | |
{ | |
this._container = null, | |
this._renderer = null, | |
this._scene = null, | |
this._light = null, | |
this._camera = null, | |
this._group = null, |
View parametricequations.htm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<title>CodeDrome - Parametric Equations</title> | |
<meta charset="utf-8" /> | |
<link href="projects.css" rel="stylesheet" /> | |
</head> |