equation_painter 0.0.2+2
equation_painter: ^0.0.2+2 copied to clipboard
High-performance Flutter widget for visualizing multiple mathematical equations simultaneously with beautiful reveal animations and a customizable coordinate system.
📈 equation_painter #
Open Sourced by GitHub user junayedahamed
A powerful, interactive, and performant Flutter package for visualizing multiple mathematical equations simultaneously with beautiful animations and a fully customizable coordinate system.
Language Switch / ভাষা পরিবর্তন #
🇬🇧 English Documentation (Click to Expand/Collapse)
✨ Features #
- ✅ New: Interactive Panning: You can now drag to pan around the coordinate system!
- ✅ Robust Equation Parsing: Type equations like
x^2 + y^2 - 100,sin(2x) - y,pow(x,2) * atan2(y,x)directly. It supports implicit multiplication (2x), constants (pi,e), unit +/- and ~20 built-in math functions. - ✅ Coordinate Labels: Show dynamic numbers along the axis to measure your functions.
- ✅ Configurable Units: Define how many units each grid square represents.
- ✅ Dynamic Animations: Beautiful
radial,sequential,linearX, orlinearYdraw mechanics. - ✅ High Performance: Highly optimized utilizing
Float32List,drawRawPointsand Marching Squares evaluation to preserve silky smooth 60fps framerates.
📸 Screenshots #
🚀 Getting Started #
Add the package to your pubspec.yaml:
dependencies:
equation_painter: ^0.0.1+2
💡 Usage #
import 'package:equation_painter/equation_painter.dart';
// ... inside your widget tree
EquationPainterWidget(
width: double.infinity,
height: 400,
interactive: true, // Auto pan/zoom enabled!
unitsPerSquare: 50.0,
alignment: Alignment.center,
equations: [
EquationConfig(
function: EquationParser.parse('x^2 + y^2 - 2500'), // x^2 + y^2 = 50^2
color: Colors.cyanAccent,
strokeWidth: 3,
animationType: AnimationType.radial,
),
],
)
🧮 Enhanced Equation Parsing #
You can parse string-based equations directly using EquationParser. It's highly tolerant!
final userEquation = "tan(20x) - tan(15y) + sin(xy) - 10";
final mathFunction = EquationParser.parseOrNull(userEquation); // Returns null if invalid
if (mathFunction != null) {
EquationConfig(
function: mathFunction,
color: Colors.pinkAccent,
)
}
🔭 Future Ideas #
- Adding Polar Coordinate system support.
- Inequality shading support (e.g.,
y >= x). - User tapping on graph curves to trace exact X/Y coordinate values dynamically.
🇧🇩 বাংলা ডকুমেন্টেশন (বিস্তারিত দেখতে ক্লিক করুন)
বৈশিষ্ট্যসমূহ #
- ✅ নতুন: ইন্টারেক্টিভ প্যানিং: আপনি এখন গ্রাফে ড্র্যাগ করে চারপাশে প্যান করতে পারেন!
- ✅ শক্তিশালী ইকুয়েশন পার্সার: আপনি এখন সরাসরি
x^2 + y^2 - 100,sin(2x) - yএর মতো সমীকরণ টাইপ করতে পারেন। এটি ಇমপ্লিসিট গুণ (2x), ধ্রুবক (pi,e), এবং ২০টিরও বেশি বিল্ট-ইন গাণিতিক ফাংশন সাপোর্ট করে। - ✅ স্থানাঙ্ক লেবেল: ফাংশন পরিমাপ করার জন্য ডাইনামিক অক্ষে সংখ্যা প্রদর্শন।
- ✅ ডায়নামিক অ্যানিমেশন:
radial,sequential,linearX, অথবাlinearYঅ্যানিমেশন স্টাইল। - ✅ উচ্চ পারফরম্যান্স: মসৃণ ফ্রেম রেটের জন্য
Float32ListএবংdrawRawPointsব্যবহার করে অপ্টিমাইজ করা হয়েছে।
🚀 শুরু করা যাক #
আপনার pubspec.yaml-এ প্যাকেজটি যোগ করুন:
dependencies:
equation_painter: ^0.0.1+2
💡 ব্যবহার পদ্ধতি #
import 'package:equation_painter/equation_painter.dart';
// ... আপনার উইজেট ট্রির ভেতরে
EquationPainterWidget(
width: double.infinity,
height: 400,
interactive: true, // ইন্টারেক্টিভ প্যানিং চালু
unitsPerSquare: 50.0,
alignment: Alignment.center,
equations: [
EquationConfig(
function: EquationParser.parse('x^2 + y^2 - 2500'),
color: Colors.cyanAccent,
strokeWidth: 3,
animationType: AnimationType.radial,
),
],
)
🔭 ভবিষ্যতের আপগ্রেড আইডিয়া #
- পোলার স্থানাঙ্ক ব্যবস্থার (Polar Coordinate) সমর্থন।
- ইনইকুয়ালিটি শেডিং-এর সমর্থন (যেমন,
y >= xএর রেন্ডারিং)। - রেখায় ট্যাপ করে সঠিক স্থানাঙ্ক (X/Y) বের করার ব্যবস্থা।
📄 License #
This project is licensed under the MIT License - see the LICENSE file for details.
🤝 Contributing #
Contributions are welcome! Feel free to open issues or submit pull requests.
Crafted with ❤️ for Mathematicians and Developers.