Untitled
unknown
plain_text
3 months ago
31 kB
14
Indexable
const pptxgen = require("pptxgenjs");
async function createPresentation() {
let pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.title = "Dream Trip to Japan";
const NAVY = "1A1A2E";
const RED = "C8102E";
const CREAM = "FEF9F4";
const SAKURA = "E8B4B8";
const WHITE = "FFFFFF";
const GRAY = "5A6072";
const LIGHT = "F5F1EE";
const BLUE = "2471A3";
const GREEN = "1B6E2E";
const makeShadow = () => ({ type: "outer", blur: 8, offset: 3, angle: 135, color: "000000", opacity: 0.12 });
const makeShadowSm = () => ({ type: "outer", blur: 4, offset: 2, angle: 135, color: "000000", opacity: 0.08 });
function addPhotoBox(s, x, y, w, h, label) {
s.addShape(pres.shapes.RECTANGLE, { x, y, w, h, fill: { color: "CCCCCC" } });
s.addShape(pres.shapes.RECTANGLE, {
x: x + w/2 - 0.5, y: y + h/2 - 0.5, w: 1.0, h: 1.0,
fill: { color: "AAAAAA" }
});
s.addText("📷 " + label, {
x: x + 0.1, y: y + h - 0.42, w: w - 0.2, h: 0.38,
fontSize: 10, color: "555555", fontFace: "Calibri", align: "center", italic: true
});
}
// ── SLIDE 1: TITLE ──────────────────────────────────────
{
let s = pres.addSlide();
s.background = { color: NAVY };
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 0.12, fill: { color: RED } });
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 5.505, w: 10, h: 0.12, fill: { color: SAKURA } });
// decorative petals
[[0.7,0.9],[9.3,0.7],[0.4,4.8],[9.5,4.6],[5,0.4],[5,5.0],[2.5,5.1],[7.5,5.1]].forEach(([cx,cy]) => {
s.addShape(pres.shapes.OVAL, { x: cx-0.35, y: cy-0.35, w: 0.7, h: 0.7, fill: { color: SAKURA, transparency: 75 } });
s.addShape(pres.shapes.OVAL, { x: cx-0.18, y: cy-0.18, w: 0.36, h: 0.36, fill: { color: SAKURA, transparency: 55 } });
});
s.addText("🌸", { x: 0.5, y: 0.72, w: 9, h: 0.8, fontSize: 40, align: "center" });
s.addText("Dream Trip to Japan", {
x: 0.5, y: 1.5, w: 9, h: 1.5,
fontSize: 54, bold: true, color: WHITE, align: "center", fontFace: "Georgia"
});
s.addShape(pres.shapes.RECTANGLE, { x: 3.5, y: 3.18, w: 3.0, h: 0.07, fill: { color: SAKURA } });
s.addText("Arick Liu & Vavin Zhao", {
x: 0.5, y: 3.32, w: 9, h: 0.55,
fontSize: 22, color: SAKURA, align: "center", fontFace: "Calibri"
});
s.addText("Exponentials Trip Project • August 26 – September 5, 2031", {
x: 0.5, y: 4.0, w: 9, h: 0.45,
fontSize: 14, color: WHITE, align: "center", fontFace: "Calibri", italic: true
});
}
// ── SLIDE 2: TRIP OVERVIEW ──────────────────────────────
{
let s = pres.addSlide();
s.background = { color: CREAM };
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 4.0, h: 5.625, fill: { color: NAVY } });
s.addText("THE DESTINATION", {
x: 0.3, y: 0.45, w: 3.5, h: 0.35,
fontSize: 10, color: SAKURA, bold: true, charSpacing: 4, fontFace: "Calibri"
});
s.addText("Saitama &\nTokyo, Japan", {
x: 0.3, y: 0.88, w: 3.5, h: 1.2,
fontSize: 28, bold: true, color: WHITE, fontFace: "Georgia"
});
s.addShape(pres.shapes.RECTANGLE, { x: 0.3, y: 2.15, w: 1.2, h: 0.05, fill: { color: RED } });
const details = [
["📅","Dates","Aug 26 – Sep 5, 2031"],
["🌙","Duration","10 nights"],
["👥","Travelers","2 people"],
["💰","Budget","$2,055"],
["✈️","Departing","New York, NY"],
];
details.forEach(([icon,label,val],i) => {
s.addText([
{ text: icon+" ", options: {} },
{ text: label+": ", options: { bold: true, color: SAKURA } },
{ text: val, options: { color: WHITE } },
], { x: 0.3, y: 2.35+i*0.52, w: 3.5, h: 0.42, fontSize: 13, fontFace: "Calibri" });
});
addPhotoBox(s, 4.2, 0.3, 5.5, 3.7, "Add Japan/Tokyo photo here");
s.addShape(pres.shapes.RECTANGLE, { x: 4.2, y: 4.15, w: 5.5, h: 1.2, fill: { color: NAVY }, shadow: makeShadowSm() });
s.addText("Japan · 10 Days · 5 Years of Saving 🌸", {
x: 4.4, y: 4.28, w: 5.1, h: 0.52,
fontSize: 17, bold: true, color: WHITE, fontFace: "Georgia", align: "center"
});
s.addText("The trip we worked for", {
x: 4.4, y: 4.82, w: 5.1, h: 0.35,
fontSize: 12, color: SAKURA, fontFace: "Calibri", italic: true, align: "center"
});
}
// ── SLIDE 3: GETTING THERE & HOTEL ─────────────────────
{
let s = pres.addSlide();
s.background = { color: LIGHT };
s.addText("Getting There & Staying", {
x: 0.5, y: 0.15, w: 9, h: 0.6,
fontSize: 30, bold: true, color: NAVY, fontFace: "Georgia"
});
// Transport
s.addShape(pres.shapes.RECTANGLE, { x: 0.35, y: 0.95, w: 4.35, h: 4.35, fill: { color: WHITE }, shadow: makeShadow() });
s.addShape(pres.shapes.RECTANGLE, { x: 0.35, y: 0.95, w: 4.35, h: 0.08, fill: { color: RED } });
s.addText("✈ TRANSPORTATION", {
x: 0.55, y: 1.1, w: 3.95, h: 0.38,
fontSize: 13, bold: true, color: RED, fontFace: "Calibri", margin: 0
});
addPhotoBox(s, 0.35, 1.55, 4.35, 1.5, "Flight photo");
s.addText([
{ text: "Philippine Airlines (one-way)\n", options: { bold: true, breakLine: true } },
{ text: "$479 / person\n\n", options: { color: RED, breakLine: true } },
{ text: "Narita Express + Local Trains\n", options: { bold: true, breakLine: true } },
{ text: "Suica + Pasmo — $40 / person", options: { color: GRAY } },
], { x: 0.55, y: 3.15, w: 3.95, h: 1.75, fontSize: 12, color: NAVY, fontFace: "Calibri" });
s.addText("Total $519", {
x: 0.55, y: 4.88, w: 3.95, h: 0.3,
fontSize: 14, bold: true, color: RED, fontFace: "Calibri", align: "right", margin: 0
});
// Hotel
s.addShape(pres.shapes.RECTANGLE, { x: 5.3, y: 0.95, w: 4.35, h: 4.35, fill: { color: WHITE }, shadow: makeShadow() });
s.addShape(pres.shapes.RECTANGLE, { x: 5.3, y: 0.95, w: 4.35, h: 0.08, fill: { color: NAVY } });
s.addText("🏨 ACCOMMODATIONS", {
x: 5.5, y: 1.1, w: 3.95, h: 0.38,
fontSize: 13, bold: true, color: NAVY, fontFace: "Calibri", margin: 0
});
addPhotoBox(s, 5.3, 1.55, 4.35, 1.5, "Hotel photo");
s.addText([
{ text: "Palace Hotel Omiya\n", options: { bold: true, breakLine: true } },
{ text: "Saitama, Japan\n\n", options: { italic: true, color: GRAY, breakLine: true } },
{ text: "$53 / night × 10 nights", options: { bold: true } },
], { x: 5.5, y: 3.15, w: 3.95, h: 1.75, fontSize: 12, color: NAVY, fontFace: "Calibri" });
s.addText("Total $530", {
x: 5.5, y: 4.88, w: 3.95, h: 0.3,
fontSize: 14, bold: true, color: NAVY, fontFace: "Calibri", align: "right", margin: 0
});
}
// ── SLIDE 4: FOOD & ACTIVITIES ──────────────────────────
{
let s = pres.addSlide();
s.background = { color: CREAM };
s.addText("Food & Activities", {
x: 0.5, y: 0.15, w: 9, h: 0.6,
fontSize: 30, bold: true, color: NAVY, fontFace: "Georgia"
});
addPhotoBox(s, 0.35, 0.95, 4.35, 2.5, "Japanese food photo");
s.addShape(pres.shapes.RECTANGLE, { x: 0.35, y: 3.5, w: 4.35, h: 1.8, fill: { color: NAVY } });
s.addText("🍜 FOOD & DRINKS", {
x: 0.55, y: 3.6, w: 3.95, h: 0.38,
fontSize: 12, bold: true, color: SAKURA, fontFace: "Calibri", margin: 0
});
s.addText("Street food, convenience stores,\nrestaurants & matcha experiences\n~$65/day × 10 days", {
x: 0.55, y: 4.02, w: 3.95, h: 0.95,
fontSize: 12, color: WHITE, fontFace: "Calibri"
});
s.addText("Total $650", {
x: 0.55, y: 5.0, w: 3.95, h: 0.26,
fontSize: 12, bold: true, color: SAKURA, fontFace: "Calibri", align: "right", margin: 0
});
addPhotoBox(s, 5.3, 0.95, 4.35, 2.5, "USJ / Skytree / Temples photo");
s.addShape(pres.shapes.RECTANGLE, { x: 5.3, y: 3.5, w: 4.35, h: 1.8, fill: { color: RED } });
s.addText("🎡 ACTIVITIES & MISC", {
x: 5.5, y: 3.6, w: 3.95, h: 0.38,
fontSize: 12, bold: true, color: WHITE, fontFace: "Calibri", margin: 0
});
s.addText("Universal Studios Japan $56\nTeamLab, Skytree, Temples $50\nSouvenirs, skincare, clothes $250", {
x: 5.5, y: 4.02, w: 3.95, h: 0.95,
fontSize: 12, color: WHITE, fontFace: "Calibri"
});
s.addText("Total $356", {
x: 5.5, y: 5.0, w: 3.95, h: 0.26,
fontSize: 12, bold: true, color: WHITE, fontFace: "Calibri", align: "right", margin: 0
});
}
// ── SLIDE 5: TOTAL COST ─────────────────────────────────
{
let s = pres.addSlide();
s.background = { color: NAVY };
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 0.12, fill: { color: RED } });
s.addText("Total Trip Cost", {
x: 0.5, y: 0.25, w: 9, h: 0.65,
fontSize: 34, bold: true, color: WHITE, fontFace: "Georgia", align: "center"
});
const boxes = [
{ label: "Transport", val: "$519", color: RED },
{ label: "Hotel", val: "$530", color: BLUE },
{ label: "Food", val: "$650", color: GREEN },
{ label: "Activities\n& Misc", val: "$356", color: "9B5E0A" },
];
boxes.forEach((b, i) => {
const x = 0.3 + i * 2.38;
s.addShape(pres.shapes.RECTANGLE, { x, y: 1.15, w: 2.2, h: 2.25, fill: { color: b.color } });
s.addText(b.label, { x, y: 1.22, w: 2.2, h: 0.65, fontSize: 14, bold: true, color: WHITE, fontFace: "Calibri", align: "center" });
s.addText(b.val, { x, y: 1.98, w: 2.2, h: 1.35, fontSize: 30, bold: true, color: WHITE, fontFace: "Georgia", align: "center", valign: "middle" });
});
s.addShape(pres.shapes.RECTANGLE, { x: 0.3, y: 3.6, w: 9.4, h: 1.65, fill: { color: SAKURA } });
s.addText("TOTAL TRIP COST", {
x: 0.55, y: 3.75, w: 4.5, h: 0.55,
fontSize: 14, bold: true, color: NAVY, fontFace: "Calibri", valign: "middle", charSpacing: 2
});
s.addText("$2,055", {
x: 5.0, y: 3.62, w: 4.55, h: 1.6,
fontSize: 60, bold: true, color: NAVY, fontFace: "Georgia", align: "right", valign: "middle"
});
}
// ── SLIDE 6: AXOS BANK ──────────────────────────────────
{
let s = pres.addSlide();
s.background = { color: CREAM };
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 4.8, h: 5.625, fill: { color: BLUE } });
s.addText("Investment 1", {
x: 0.3, y: 0.32, w: 4.2, h: 0.35,
fontSize: 11, color: WHITE, fontFace: "Calibri", charSpacing: 3
});
s.addText("Axos Bank\nHigh-Yield Savings", {
x: 0.3, y: 0.72, w: 4.2, h: 1.15,
fontSize: 28, bold: true, color: WHITE, fontFace: "Georgia"
});
s.addText("4.21% APY", {
x: 0.3, y: 1.95, w: 4.2, h: 0.72,
fontSize: 34, bold: true, color: "A8D8EA", fontFace: "Georgia"
});
s.addText("We invested: $1,000", {
x: 0.3, y: 2.75, w: 4.2, h: 0.38,
fontSize: 13, color: WHITE, fontFace: "Calibri", italic: true
});
s.addShape(pres.shapes.RECTANGLE, { x: 0.3, y: 3.22, w: 3.5, h: 0.04, fill: { color: WHITE, transparency: 60 } });
s.addText("Monthly:", { x: 0.3, y: 3.35, w: 4.2, h: 0.3, fontSize: 11, color: "A8D8EA", fontFace: "Calibri", bold: true });
s.addText("A(t) = 1000(1.003442)^12t", { x: 0.3, y: 3.65, w: 4.2, h: 0.38, fontSize: 14, color: WHITE, fontFace: "Consolas", italic: true });
s.addText("Daily:", { x: 0.3, y: 4.1, w: 4.2, h: 0.3, fontSize: 11, color: "A8D8EA", fontFace: "Calibri", bold: true });
s.addText("A(t) = 1000(1.0001129)^365t", { x: 0.3, y: 4.4, w: 4.2, h: 0.38, fontSize: 14, color: WHITE, fontFace: "Consolas", italic: true });
s.addText("Domain: 0 ≤ t ≤ 5 | Range: $1000–$1228.98", {
x: 0.3, y: 4.9, w: 4.2, h: 0.35,
fontSize: 9.5, color: "A8D8EA", fontFace: "Calibri", italic: true
});
s.addText("After 5 Years", {
x: 5.0, y: 1.35, w: 4.7, h: 0.48,
fontSize: 18, color: GRAY, fontFace: "Calibri", align: "center"
});
s.addText("$1,228.98", {
x: 5.0, y: 1.88, w: 4.7, h: 1.35,
fontSize: 54, bold: true, color: BLUE, fontFace: "Georgia", align: "center"
});
s.addShape(pres.shapes.RECTANGLE, { x: 5.0, y: 3.38, w: 4.7, h: 1.95, fill: { color: WHITE }, shadow: makeShadow() });
s.addText("Inverse Function", {
x: 5.2, y: 3.48, w: 4.3, h: 0.42,
fontSize: 14, bold: true, color: NAVY, fontFace: "Georgia", align: "center"
});
s.addText("f⁻¹(A) = log(A / 1000)", {
x: 5.2, y: 4.0, w: 4.3, h: 0.38,
fontSize: 13, color: NAVY, fontFace: "Consolas", align: "center", italic: true
});
s.addShape(pres.shapes.RECTANGLE, { x: 5.9, y: 4.4, w: 2.9, h: 0.04, fill: { color: GRAY } });
s.addText("12 · log(1.003442)", {
x: 5.2, y: 4.48, w: 4.3, h: 0.38,
fontSize: 13, color: NAVY, fontFace: "Consolas", align: "center", italic: true
});
s.addText("\"How long until $A is reached?\"", {
x: 5.2, y: 4.95, w: 4.3, h: 0.3,
fontSize: 10.5, color: GRAY, fontFace: "Calibri", align: "center", italic: true
});
}
// ── SLIDE 7: LIMELIGHT BANK ─────────────────────────────
{
let s = pres.addSlide();
s.background = { color: CREAM };
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 4.8, h: 5.625, fill: { color: GREEN } });
s.addText("Investment 2 (Researched)", {
x: 0.3, y: 0.32, w: 4.2, h: 0.35,
fontSize: 11, color: WHITE, fontFace: "Calibri", charSpacing: 2
});
s.addText("Limelight Bank\n60-Month CD", {
x: 0.3, y: 0.72, w: 4.2, h: 1.15,
fontSize: 28, bold: true, color: WHITE, fontFace: "Georgia"
});
s.addText("3.30% APY", {
x: 0.3, y: 1.95, w: 4.2, h: 0.72,
fontSize: 34, bold: true, color: "A5D6A7", fontFace: "Georgia"
});
s.addText("$1,000 minimum deposit", {
x: 0.3, y: 2.75, w: 4.2, h: 0.38,
fontSize: 13, color: WHITE, fontFace: "Calibri", italic: true
});
s.addShape(pres.shapes.RECTANGLE, { x: 0.3, y: 3.22, w: 3.5, h: 0.04, fill: { color: WHITE, transparency: 60 } });
s.addText("Monthly:", { x: 0.3, y: 3.35, w: 4.2, h: 0.3, fontSize: 11, color: "A5D6A7", fontFace: "Calibri", bold: true });
s.addText("A(t) = 1000(1.002715)^12t", { x: 0.3, y: 3.65, w: 4.2, h: 0.38, fontSize: 14, color: WHITE, fontFace: "Consolas", italic: true });
s.addText("Daily:", { x: 0.3, y: 4.1, w: 4.2, h: 0.3, fontSize: 11, color: "A5D6A7", fontFace: "Calibri", bold: true });
s.addText("A(t) = 1000(1.0000890)^365t", { x: 0.3, y: 4.4, w: 4.2, h: 0.38, fontSize: 14, color: WHITE, fontFace: "Consolas", italic: true });
s.addText("Domain: 0 ≤ t ≤ 5 | Range: $1000–$1176.26", {
x: 0.3, y: 4.9, w: 4.2, h: 0.35,
fontSize: 9.5, color: "A5D6A7", fontFace: "Calibri", italic: true
});
s.addText("After 5 Years", {
x: 5.0, y: 1.35, w: 4.7, h: 0.48,
fontSize: 18, color: GRAY, fontFace: "Calibri", align: "center"
});
s.addText("$1,176.26", {
x: 5.0, y: 1.88, w: 4.7, h: 1.35,
fontSize: 54, bold: true, color: GREEN, fontFace: "Georgia", align: "center"
});
s.addShape(pres.shapes.RECTANGLE, { x: 5.0, y: 3.38, w: 4.7, h: 1.95, fill: { color: WHITE }, shadow: makeShadow() });
s.addText("Why We Chose Axos Instead", {
x: 5.2, y: 3.5, w: 4.3, h: 0.42,
fontSize: 14, bold: true, color: NAVY, fontFace: "Georgia", align: "center"
});
s.addText([
{ text: "Higher APY: 4.21% vs 3.30%\n", options: { breakLine: true } },
{ text: "$52.72 more earned after 5 years\n", options: { breakLine: true } },
{ text: "No 5-year lock-in restriction", options: {} },
], { x: 5.2, y: 4.05, w: 4.3, h: 1.2, fontSize: 13, color: NAVY, fontFace: "Calibri", align: "center" });
}
// ── SLIDE 8: BANK OF AURELIA ────────────────────────────
{
let s = pres.addSlide();
s.background = { color: NAVY };
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 0.12, fill: { color: RED } });
s.addText("🐕 The Lost Dog Reward", {
x: 0.5, y: 0.25, w: 9, h: 0.65,
fontSize: 32, bold: true, color: WHITE, fontFace: "Georgia"
});
s.addText("At 18, we found and returned Sir Steve St. Joseph to his owner Gertie May — she rewarded us $300!", {
x: 0.5, y: 1.0, w: 9, h: 0.55,
fontSize: 14, color: SAKURA, fontFace: "Calibri", italic: true, align: "center"
});
s.addShape(pres.shapes.RECTANGLE, { x: 0.8, y: 1.75, w: 8.4, h: 3.4, fill: { color: RED }, shadow: makeShadow() });
s.addShape(pres.shapes.RECTANGLE, { x: 0.8, y: 1.75, w: 8.4, h: 0.08, fill: { color: "FFCDD2" } });
s.addText("Bank of Aurelia · 15% Continuously Compounded", {
x: 1.0, y: 1.9, w: 8.0, h: 0.58,
fontSize: 18, bold: true, color: WHITE, fontFace: "Georgia", align: "center"
});
s.addShape(pres.shapes.RECTANGLE, { x: 1.8, y: 2.55, w: 6.4, h: 0.04, fill: { color: "FFCDD2" } });
s.addText("A(t) = 300e^(0.15t)", {
x: 1.0, y: 2.68, w: 8.0, h: 0.68,
fontSize: 30, bold: true, color: WHITE, fontFace: "Consolas", align: "center"
});
s.addText("Inverse: f⁻¹(A) = ln(A / 300) / 0.15", {
x: 1.0, y: 3.42, w: 8.0, h: 0.42,
fontSize: 16, color: "FFCDD2", fontFace: "Consolas", align: "center", italic: true
});
s.addText("End behavior: As t→+∞, A(t)→∞ | As t→−∞, A(t)→0", {
x: 1.0, y: 3.92, w: 8.0, h: 0.38,
fontSize: 12, color: WHITE, fontFace: "Calibri", align: "center", italic: true
});
s.addText("$300 → $470.49 after 3 years", {
x: 1.0, y: 4.38, w: 8.0, h: 0.55,
fontSize: 22, bold: true, color: WHITE, fontFace: "Georgia", align: "center"
});
s.addText("We put ALL $300 here — 15% far outperforms any regular bank", {
x: 0.5, y: 5.22, w: 9, h: 0.3,
fontSize: 12, color: SAKURA, fontFace: "Calibri", align: "center", italic: true
});
}
// ── SLIDE 9: BUDGET SUMMARY ─────────────────────────────
{
let s = pres.addSlide();
s.background = { color: LIGHT };
s.addText("The Bottom Line", {
x: 0.5, y: 0.15, w: 9, h: 0.6,
fontSize: 32, bold: true, color: NAVY, fontFace: "Georgia"
});
const rows = [
{ label: "🏦 Axos Bank (5 years, 4.21% APY)", val: "$1,228.98", color: BLUE },
{ label: "⚡ Bank of Aurelia (3 years, 15%)", val: "$470.49", color: RED },
];
rows.forEach((r, i) => {
const y = 1.02 + i * 1.18;
s.addShape(pres.shapes.RECTANGLE, { x: 0.4, y, w: 9.2, h: 1.0, fill: { color: WHITE }, shadow: makeShadowSm() });
s.addShape(pres.shapes.RECTANGLE, { x: 0.4, y, w: 0.12, h: 1.0, fill: { color: r.color } });
s.addText(r.label, { x: 0.65, y: y+0.07, w: 6.5, h: 0.8, fontSize: 15, color: NAVY, fontFace: "Calibri", bold: true, valign: "middle" });
s.addText(r.val, { x: 7.3, y, w: 2.15, h: 1.0, fontSize: 28, bold: true, color: r.color, fontFace: "Georgia", align: "right", valign: "middle" });
});
s.addShape(pres.shapes.RECTANGLE, { x: 0.4, y: 3.52, w: 9.2, h: 0.05, fill: { color: GRAY } });
s.addShape(pres.shapes.RECTANGLE, { x: 0.4, y: 3.68, w: 9.2, h: 0.9, fill: { color: "E8F5E9" }, shadow: makeShadowSm() });
s.addText("💰 Total Available Budget", { x: 0.65, y: 3.73, w: 6.0, h: 0.8, fontSize: 15, bold: true, color: GREEN, fontFace: "Calibri", valign: "middle" });
s.addText("$1,699.47", { x: 7.0, y: 3.68, w: 2.5, h: 0.9, fontSize: 26, bold: true, color: GREEN, fontFace: "Georgia", align: "right", valign: "middle" });
s.addShape(pres.shapes.RECTANGLE, { x: 0.4, y: 4.72, w: 9.2, h: 0.72, fill: { color: "FFEBEE" }, shadow: makeShadowSm() });
s.addText("⚠️ Original Trip Cost — Deficit After Investments", { x: 0.65, y: 4.76, w: 5.5, h: 0.6, fontSize: 14, color: RED, fontFace: "Calibri", valign: "middle" });
s.addText("$2,055 (–$355.53)", { x: 6.3, y: 4.72, w: 3.2, h: 0.72, fontSize: 16, bold: true, color: RED, fontFace: "Georgia", align: "right", valign: "middle" });
}
// ── SLIDE 10: EQUATIONS & GRAPHS ────────────────────────
{
let s = pres.addSlide();
s.background = { color: CREAM };
s.addText("Equations & Graphs", {
x: 0.5, y: 0.15, w: 9, h: 0.6,
fontSize: 30, bold: true, color: NAVY, fontFace: "Georgia"
});
s.addShape(pres.shapes.RECTANGLE, { x: 0.35, y: 0.95, w: 4.5, h: 4.35, fill: { color: WHITE }, shadow: makeShadow() });
s.addText("All Equations", { x: 0.55, y: 1.05, w: 4.1, h: 0.4, fontSize: 14, bold: true, color: NAVY, fontFace: "Georgia" });
const eqs = [
{ label: "Axos (monthly)", eq: "A(t) = 1000(1.003442)¹²ᵗ", col: BLUE },
{ label: "Axos (daily)", eq: "A(t) = 1000(1.0001129)³⁶⁵ᵗ", col: BLUE },
{ label: "Limelight (monthly)", eq: "A(t) = 1000(1.002715)¹²ᵗ", col: GREEN },
{ label: "Limelight (daily)", eq: "A(t) = 1000(1.0000890)³⁶⁵ᵗ", col: GREEN },
{ label: "Bank of Aurelia", eq: "A(t) = 300e^(0.15t)", col: RED },
];
eqs.forEach((e, i) => {
const y = 1.62 + i * 0.68;
s.addShape(pres.shapes.RECTANGLE, { x: 0.55, y: y+0.02, w: 0.07, h: 0.52, fill: { color: e.col } });
s.addText(e.label, { x: 0.75, y: y+0.02, w: 3.9, h: 0.26, fontSize: 10.5, color: GRAY, fontFace: "Calibri", italic: true });
s.addText(e.eq, { x: 0.75, y: y+0.28, w: 3.9, h: 0.32, fontSize: 12.5, color: e.col, fontFace: "Consolas", bold: true });
});
s.addShape(pres.shapes.RECTANGLE, { x: 5.1, y: 0.95, w: 4.5, h: 4.35, fill: { color: NAVY }, shadow: makeShadow() });
s.addText("Graphs & Inverses", { x: 5.3, y: 1.05, w: 4.1, h: 0.4, fontSize: 14, bold: true, color: WHITE, fontFace: "Georgia" });
const notes = [
{ h: "Axos & Limelight:", b: "Exponential growth curves\nHand-drawn on graph paper ✏️" },
{ h: "Inverse Functions:", b: "f⁻¹(A) = log(A/1000) / (12·log(base))\nLogarithmic — drawn on own axes" },
{ h: "Bank of Aurelia:", b: "f⁻¹(A) = ln(A/300) / 0.15\nContinuous growth model" },
];
notes.forEach((n, i) => {
const y = 1.62 + i * 1.12;
s.addText(n.h, { x: 5.3, y, w: 4.1, h: 0.35, fontSize: 12, bold: true, color: SAKURA, fontFace: "Calibri" });
s.addText(n.b, { x: 5.3, y: y+0.35, w: 4.1, h: 0.72, fontSize: 11.5, color: WHITE, fontFace: "Calibri" });
});
}
// ── SLIDE 11: WORD PROBLEMS ─────────────────────────────
{
let s = pres.addSlide();
s.background = { color: NAVY };
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 0.12, fill: { color: RED } });
s.addText("Word Problems", {
x: 0.5, y: 0.2, w: 9, h: 0.6,
fontSize: 30, bold: true, color: WHITE, fontFace: "Georgia"
});
s.addText("One partner wrote the problem — the other solved it.", {
x: 0.5, y: 0.85, w: 9, h: 0.38,
fontSize: 13, color: SAKURA, fontFace: "Calibri", italic: true
});
// Problem 1
s.addShape(pres.shapes.RECTANGLE, { x: 0.4, y: 1.38, w: 9.2, h: 1.85, fill: { color: "0A1F35" }, shadow: makeShadow() });
s.addShape(pres.shapes.RECTANGLE, { x: 0.4, y: 1.38, w: 0.12, h: 1.85, fill: { color: BLUE } });
s.addText("Problem 1 — Axos Bank", { x: 0.65, y: 1.48, w: 8.7, h: 0.4, fontSize: 13, bold: true, color: BLUE, fontFace: "Calibri" });
s.addText([
{ text: "Q: How long for $1,000 in Axos Bank to reach the trip cost of $2,055?\n", options: { breakLine: true } },
{ text: "A: 1000(1.003442)^12t = 2055 → t = log(2.055)/(12·log(1.003442)) ≈ 17.7 years", options: { bold: true, color: "A8D8EA" } },
], { x: 0.65, y: 1.93, w: 8.7, h: 1.2, fontSize: 12.5, color: WHITE, fontFace: "Calibri" });
// Problem 2
s.addShape(pres.shapes.RECTANGLE, { x: 0.4, y: 3.45, w: 9.2, h: 1.85, fill: { color: "1F0A0A" }, shadow: makeShadow() });
s.addShape(pres.shapes.RECTANGLE, { x: 0.4, y: 3.45, w: 0.12, h: 1.85, fill: { color: RED } });
s.addText("Problem 2 — Bank of Aurelia", { x: 0.65, y: 3.55, w: 8.7, h: 0.4, fontSize: 13, bold: true, color: RED, fontFace: "Calibri" });
s.addText([
{ text: "Q: How long for $300 in the Bank of Aurelia to reach the trip cost of $2,055?\n", options: { breakLine: true } },
{ text: "A: 300e^(0.15t) = 2055 → t = ln(6.85)/0.15 ≈ 12.8 years", options: { bold: true, color: "FFCDD2" } },
], { x: 0.65, y: 4.0, w: 8.7, h: 1.2, fontSize: 12.5, color: WHITE, fontFace: "Calibri" });
}
// ── SLIDE 12: REVAMPED TRIP ─────────────────────────────
{
let s = pres.addSlide();
s.background = { color: LIGHT };
s.addText("Revamped Trip — Fit Our Budget", {
x: 0.5, y: 0.15, w: 9, h: 0.6,
fontSize: 28, bold: true, color: NAVY, fontFace: "Georgia"
});
s.addText("Budget available: $1,699.47 · Needed to cut: $355.53", {
x: 0.5, y: 0.78, w: 9, h: 0.38,
fontSize: 14, color: RED, fontFace: "Calibri", italic: true
});
s.addShape(pres.shapes.RECTANGLE, { x: 0.35, y: 1.3, w: 4.35, h: 4.0, fill: { color: "FFEBEE" }, shadow: makeShadowSm() });
s.addText("❌ Original", { x: 0.55, y: 1.4, w: 3.95, h: 0.48, fontSize: 17, bold: true, color: RED, fontFace: "Georgia" });
["Transport $519","Palace Hotel $530","Food $650","Activities $356","────────────","TOTAL $2,055"].forEach((line, i) => {
s.addText(line, { x: 0.55, y: 2.0+i*0.48, w: 3.95, h: 0.42, fontSize: 13, color: i===5?RED:NAVY, bold: i===5, fontFace: "Calibri" });
});
s.addShape(pres.shapes.RECTANGLE, { x: 5.3, y: 1.3, w: 4.35, h: 4.0, fill: { color: "E8F5E9" }, shadow: makeShadowSm() });
s.addText("✅ Revised", { x: 5.5, y: 1.4, w: 3.95, h: 0.48, fontSize: 17, bold: true, color: GREEN, fontFace: "Georgia" });
["Transport $519","Hotel [add cost]","Food [add cost]","Activities [add cost]","────────────","TOTAL ≤ $1,699.47"].forEach((line, i) => {
const isP = line.includes("[add cost]");
s.addText(line, { x: 5.5, y: 2.0+i*0.48, w: 3.95, h: 0.42, fontSize: 13, color: i===5?GREEN:isP?"999999":NAVY, bold: i===5, italic: isP, fontFace: "Calibri" });
});
s.addText("← Replace the [add cost] placeholders with your actual revised costs in Google Slides", {
x: 0.35, y: 5.32, w: 9.3, h: 0.28,
fontSize: 9.5, color: GRAY, fontFace: "Calibri", italic: true, align: "center"
});
}
// ── SLIDE 13: DISCUSSION ────────────────────────────────
{
let s = pres.addSlide();
s.background = { color: NAVY };
[[0.6,0.6],[9.2,0.6],[0.4,5.1],[9.4,4.9],[5,0.35],[2.2,5.2],[7.8,5.1]].forEach(([cx,cy]) => {
s.addShape(pres.shapes.OVAL, { x: cx-0.35, y: cy-0.35, w: 0.7, h: 0.7, fill: { color: SAKURA, transparency: 75 } });
});
addPhotoBox(s, 6.1, 0.1, 3.8, 5.42, "Add Japan photo here");
s.addText("Discussion", {
x: 0.3, y: 0.15, w: 5.6, h: 0.65,
fontSize: 36, bold: true, color: WHITE, fontFace: "Georgia"
});
const qs = [
{ q: "What did you learn about trip planning?", a: "Way more tedious than expected — every dollar counts on a tight budget." },
{ q: "Hardest part of planning?", a: "Choosing the right bank — too many options, had to read all the fine print." },
{ q: "Over or under budget?", a: "Way over ($2,055 vs $1,699). Had to cut luxuries and find cheaper options." },
{ q: "What did you learn about investing?", a: "Investing beats holding cash — higher APY compounds into significantly more." },
];
qs.forEach((q, i) => {
const y = 0.98 + i * 1.05;
s.addShape(pres.shapes.RECTANGLE, { x: 0.3, y, w: 5.6, h: 0.92, fill: { color: "0F2040" }, shadow: makeShadowSm() });
s.addShape(pres.shapes.RECTANGLE, { x: 0.3, y, w: 0.1, h: 0.92, fill: { color: SAKURA } });
s.addText("Q"+(i+1)+": "+q.q, { x: 0.53, y: y+0.06, w: 5.25, h: 0.35, fontSize: 11, bold: true, color: SAKURA, fontFace: "Calibri" });
s.addText(q.a, { x: 0.53, y: y+0.44, w: 5.25, h: 0.44, fontSize: 12, color: WHITE, fontFace: "Calibri" });
});
}
// ── SLIDE 14: THANK YOU ─────────────────────────────────
{
let s = pres.addSlide();
s.background = { color: NAVY };
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 0.12, fill: { color: RED } });
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 5.505, w: 10, h: 0.12, fill: { color: SAKURA } });
[[0.7,1.1],[9.1,1.0],[0.5,4.5],[9.4,4.2],[5,0.5],[5,5.0],[2.2,5.1],[7.8,5.1]].forEach(([cx,cy]) => {
s.addShape(pres.shapes.OVAL, { x: cx-0.4, y: cy-0.4, w: 0.8, h: 0.8, fill: { color: SAKURA, transparency: 80 } });
s.addShape(pres.shapes.OVAL, { x: cx-0.2, y: cy-0.2, w: 0.4, h: 0.4, fill: { color: SAKURA, transparency: 60 } });
});
s.addText("ありがとうございます", {
x: 0.5, y: 0.8, w: 9, h: 0.72,
fontSize: 26, color: SAKURA, fontFace: "Calibri", align: "center"
});
s.addText("Arigato Gozaimasu!", {
x: 0.5, y: 1.55, w: 9, h: 1.55,
fontSize: 58, bold: true, color: WHITE, fontFace: "Georgia", align: "center"
});
s.addShape(pres.shapes.RECTANGLE, { x: 3.5, y: 3.2, w: 3.0, h: 0.07, fill: { color: SAKURA } });
s.addText("Any questions?", {
x: 0.5, y: 3.35, w: 9, h: 0.65,
fontSize: 24, color: WHITE, fontFace: "Calibri", align: "center", italic: true
});
s.addText("Arick Liu & Vavin Zhao · Exponentials Trip Project", {
x: 0.5, y: 4.2, w: 9, h: 0.42,
fontSize: 13, color: SAKURA, fontFace: "Calibri", align: "center"
});
}
const out = "/mnt/user-data/outputs/Japan_Trip_Presentation.pptx";
await pres.writeFile({ fileName: out });
console.log("Saved:", out);
}
createPresentation().catch(err => { console.error(err); process.exit(1); });Editor is loading...
Leave a Comment