Skip to content
hsyvyPublic

About

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

Beautiful Maths

A visually stunning platform for exploring mathematical functions through interactive visualizations.

Features

  • Interactive Gallery: Browse a curated collection of mathematical functions with beautiful visualizations
  • Real-time Parameter Control: Adjust function parameters with intuitive sliders and see instant visual updates
  • LaTeX Rendering: Mathematical equations displayed in crisp, professional LaTeX formatting
  • Responsive Design: Optimized for desktop and mobile viewing
  • Dark Theme: Eye-friendly dark interface inspired by mathematical chalkboards
  • Smooth Animations: Fluid transitions and interactive effects using Framer Motion

Included Functions

  • Lissajous Curve: Complex harmonic motion patterns
  • Golden Spiral: The famous logarithmic spiral based on the golden ratio
  • Cardioid: Heart-shaped curve from rolling circles
  • Rose Curve: Beautiful flower-like polar patterns
  • Butterfly Curve: Transcendental curve with intricate wing patterns
  • Fourier Square Wave: Demonstration of Fourier series approximation

Tech Stack

  • React + TypeScript: Type-safe component architecture
  • Vite: Lightning-fast development and build tooling
  • Tailwind CSS: Utility-first styling with custom mathematical theme
  • KaTeX: Fast and beautiful math rendering
  • Framer Motion: Smooth animations and transitions
  • Canvas API: Hardware-accelerated function plotting

Getting Started

Prerequisites

  • Node.js 18+
  • npm or yarn

Installation

# Clone the repository
git clone https://github.com/yourusername/beautiful-maths.git

# Navigate to project directory
cd beautiful-maths

# Install dependencies
npm install

# Start development server
npm run dev

The app will be available at http://localhost:5173

Building for Production

# Build the project
npm run build

# Preview production build
npm run preview

Contributing

We welcome contributions! To add a new mathematical function:

  1. Create a new file in src/functions/ following the existing pattern
  2. Export a MathFunction object with:
    • Meta information (name, tags, description, equation)
    • Default parameters and their ranges
    • computePoints function for calculating coordinates
  3. The function will automatically appear in the gallery

Example function structure:

import { MathFunction } from '../types';

const myFunction: MathFunction = {
  meta: {
    name: "Function Name",
    slug: "function-slug",
    tags: ["tag1", "tag2"],
    author: "Mathematician Name",
    description: "Description of the function",
    equation: "LaTeX equation here",
  },
  params: {
    a: 1,
    b: 2,
  },
  paramRanges: {
    a: { min: 0, max: 10, step: 0.1 },
    b: { min: 0, max: 10, step: 0.1 },
  },
  computePoints: (t, { a, b }) => ({
    x: /* x calculation */,
    y: /* y calculation */,
  }),
};

export default myFunction;

Project Structure

beautiful-maths/
├── src/
│   ├── components/       # React components
│   ├── functions/        # Mathematical function definitions
│   ├── pages/           # Page components
│   ├── types/           # TypeScript type definitions
│   └── utils/           # Utility functions
├── public/              # Static assets
└── .github/workflows/   # CI/CD configuration

License

MIT License - feel free to use this project for educational and commercial purposes.

Acknowledgments

  • Inspired by the beauty of mathematics and the work of countless mathematicians
  • Built with modern web technologies for the best user experience
  • Special thanks to the open-source community for the amazing tools and libraries

About

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages