Skip to content

Advanced Web Platform for Generating Unstructured Clouds of Points

License

Notifications You must be signed in to change notification settings

gstinoco/CloudGen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

mGFD CloudGenerator 2.0 โ˜๏ธ

mGFD CloudGenerator Logo

GitHub Python Flask OpenCV NumPy License: MIT

Advanced Web Platform for Generating Unstructured Clouds of Points

Complete solution for meshless Generalized Finite Difference Method (mGFD) applications

๐Ÿ”— Quick Links

:globe_with_meridians: Live Demo :rocket: Quick Start :computer: Features :busts_in_silhouette: Team


๐Ÿ“‹ Table of Contents


๐ŸŒŸ Overview

The mGFD CloudGenerator 2.0 is a comprehensive web-based platform designed for generating optimized unstructured clouds of points specifically tailored for the meshless Generalized Finite Difference Method (mGFD). This advanced tool combines interactive image processing capabilities with sophisticated cloud generation algorithms to provide researchers and engineers with a complete solution for numerical simulations.

๐ŸŒ Try it now! A stable live demo is available at: https://malla.umich.mx/CloudGenerator/

โš™๏ธ Key Capabilities

  • ๐ŸŽจ Interactive Contour Creation: Optimized image segmentation with adaptive Flood Fill and smart texture analysis.
  • โ˜๏ธ Optimized Cloud Generation: High-quality point cloud generation with Regular and Natural Distribution algorithms.
  • ๐Ÿ“ˆ Real-time Visualization: Interactive canvas with zoom, pan, brush-based refinement, and multi-region support.
  • ๐Ÿ’พ Multiple Export Formats: CSV data export with PNG/SVG visualizations and statistical analysis.
  • ๐ŸŒ Web-based Interface: Modern, responsive design with asynchronous processing and Web Workers.

๐Ÿ”ฌ Applications

Field Application Use Case
Computational Fluid Dynamics ๐ŸŒŠ Flow Simulation Irregular domain discretization, boundary layer modeling
Structural Engineering ๐Ÿ—๏ธ Stress Analysis Complex geometry meshing, crack propagation studies
Heat Transfer ๐Ÿ”ฅ Thermal Analysis Non-uniform domain discretization, interface problems
Environmental Modeling ๐ŸŒฟ Pollution Transport Irregular terrain modeling, contaminant dispersion
Biomedical Engineering ๐Ÿ”ฌ Tissue Modeling Organ geometry discretization, drug delivery simulation

โœจ Features

๐ŸŽจ ContourCreator Module

  • Optimized Single-Region Detection: High-performance cv2.floodFill implementation for instant region extraction.
  • Adaptive Tolerance: Automatic sensitivity adjustment based on local image texture analysis.
  • Interactive Refinement: Seed-based tools to add or subtract regions with precision.
  • Brush-based Editing: Manual correction tools with customizable size and opacity.
  • Multi-region Management: Detect, add, remove, and modify multiple regions with color-coded visualization.
  • Canvas Operations: Zoom, pan, precise click-based region selection with coordinate tracking.
  • Format Support: PNG, JPG, JPEG, GIF, BMP, TIFF with automatic format detection.

โ˜๏ธ CloudGenerator Module

  • Advanced Distribution Algorithms: Regular and Natural Distributions.
  • Multi-region Processing: Intelligent node classification (interior, boundary, interface nodes).
  • CSV File Processing: Upload validation, data parsing, and coordinate optimization.
  • Real-time Visualization: Interactive scatter plots with statistical analysis and progress tracking.
  • Asynchronous Processing: Background cloud generation with Web Workers and real-time status updates.
  • Multiple Export Formats: CSV data files with high-resolution PNG and scalable SVG visualizations.

๐ŸŒ Web Interface

  • Modern Design: Responsive interface with modular CSS architecture and glassmorphism effects.
  • Drag & Drop: Intuitive file upload with progress indicators and validation.
  • Real-time Feedback: Live status updates, error handling, and progress tracking.
  • Professional Logging: Comprehensive logging system with file rotation and debugging.
  • Cross-platform: Compatible with all modern web browsers and operating systems.

๐Ÿ“ฆ Installation & Setup

๐Ÿ’ป System Requirements

Component Minimum Recommended
Python 3.9+ 3.10+
RAM 4 GB 8 GB+
CPU 2 cores 4+ cores
Storage 1 GB 5 GB+ (for datasets)
OS Windows/Linux/macOS Linux (optimal performance)

๐Ÿ“ฆ Dependencies

The project uses the following main dependencies:

# Core web framework
Flask >= 3.1.1                 # Web application framework
Werkzeug >= 3.1.3              # WSGI utilities

# Computer vision and image processing
opencv-python-headless >= 4.12 # Image processing (server-optimized)

# Scientific computing
numpy >= 2.2.6                 # Numerical computations
shapely >= 2.1.1               # Geometric operations
matplotlib >= 3.10.0           # Visualization and plotting

# Additional utilities
threading                      # Asynchronous processing support
logging                        # Comprehensive logging system

๐Ÿ”ง Installation Steps

Method 1: Direct Installation

# Clone the repository
git clone https://github.com/gstinoco/CloudGen.git
cd CloudGen

# Install dependencies
pip install -r requirements.txt

Method 2: Virtual Environment (Recommended)

# Create virtual environment
python -m venv mGFD_env
source mGFD_env/bin/activate  # On Windows: mGFD_env\Scripts\activate

# Clone and install
git clone https://github.com/gstinoco/CloudGen.git
cd CloudGen
pip install -r requirements.txt

Method 3: Conda Environment

# Create conda environment
conda create -n mGFD_cloudgen python=3.10
conda activate mGFD_cloudgen

# Clone and install
git clone https://github.com/gstinoco/CloudGen.git
cd CloudGen
pip install -r requirements.txt

โœ… Installation Verification

# Test installation
python -c "import flask, cv2, numpy; print('โœ… Installation successful!')"

# Run the application
python app.py

The application will be available at http://localhost:8080


๐Ÿš€ Quick Start

1. โ–ถ๏ธ Launch the Application

# Navigate to project directory
cd mGFD-CloudGenerator

# Start the web server
python app.py

2. ๐ŸŽจ Create Contours (ContourCreator)

  1. Upload Image: Navigate to ContourCreator and upload your image
  2. Detect Regions: Click on regions of interest to detect contours
  3. Manage Regions: Add, remove, or modify detected regions
  4. Export Data: Save coordinates as CSV files

3. โ˜๏ธ Generate Point Clouds (CloudGenerator)

  1. Upload CSV: Use the CSV file from ContourCreator or upload your own
  2. Configure Parameters: Set generation options (regions inside/outside)
  3. Generate Cloud: Start the cloud generation process
  4. Download Results: Get CSV data and visualization files

4. ๐Ÿ“ˆ Analyze Results

  • CSV Files: Node coordinates with region classification
  • PNG Images: High-resolution visualizations
  • SVG Files: Scalable vector graphics for publications

๐Ÿ“– Usage Guide

ContourCreator Workflow

Step 1: Image Upload

// Supported formats: PNG, JPG
// Maximum file size: 10MB
// Drag & drop or click to browse

Step 2: Region Detection

  • One-Click Detection: Instantly identify regions with optimized Flood Fill.
  • Texture Analysis: Automatic parameter adjustment for complex images.
  • Refinement: Use brush tools or seed points to perfect the contour.

Step 3: Region Management

  • Add Region: Click "Add Region" after detection
  • Toggle Visibility: Show/hide regions individually
  • Delete Region: Remove unwanted regions
  • Clear All: Reset all detected regions

Step 4: Data Export

  • Single Region: Export individual region coordinates
  • All Regions: Export complete dataset with region labels
  • CSV Format: Normalized coordinates (0-1 range)

CloudGenerator Workflow

Step 1: CSV Upload

# Expected CSV format:
x,y,region
0.1,0.2,1
0.3,0.4,1
0.5,0.6,2

Step 2: Configuration

  • Regions Inside: Generate points inside detected regions
  • Regions Outside: Generate points outside detected regions
  • Adaptive Sizing: Automatic point density optimization

Step 3: Generation Process

  • Asynchronous Processing: Background generation with status updates
  • Memory Management: Optimized for large datasets
  • Error Handling: Comprehensive error reporting

Step 4: Results

  • Node Classification: Interior, boundary, and interface nodes
  • Multiple Formats: CSV data with PNG/SVG visualizations
  • Quality Metrics: Point distribution analysis

๐Ÿ“‚ Project Architecture

mGFD-CloudGenerator/
โ”œโ”€โ”€ ๐Ÿ“„ app.py                    # Main Flask application
โ”œโ”€โ”€ ๐Ÿ“„ cloud_generation.py       # Cloud generation algorithms
โ”œโ”€โ”€ ๐Ÿ“„ reduce_points.py          # Point reduction utilities
โ”œโ”€โ”€ ๐Ÿ“„ contour_detection.py      # Contour detection logic
โ”œโ”€โ”€ ๐Ÿ“„ requirements.txt          # Python dependencies
โ”œโ”€โ”€ ๐Ÿ“ templates/                # HTML templates
โ”‚   โ”œโ”€โ”€ ๐Ÿ  home.html             # Landing page
โ”‚   โ”œโ”€โ”€ ๐ŸŽจ contour_creator.html  # ContourCreator interface
โ”‚   โ”œโ”€โ”€ โ˜๏ธ cloud_generator.html  # CloudGenerator interface
โ”‚   โ””โ”€โ”€ โ„น๏ธ about.html            # About page
โ”œโ”€โ”€ ๐Ÿ“ static/                   # Static assets
โ”‚   โ”œโ”€โ”€ ๐ŸŽจ css/                  # Modular CSS Architecture
โ”‚   โ”‚   โ”œโ”€โ”€ styles.css           # Global variables and resets
โ”‚   โ”‚   โ”œโ”€โ”€ tools.css            # Shared tool components
โ”‚   โ”‚   โ”œโ”€โ”€ home.css             # Landing page styles
โ”‚   โ”‚   โ”œโ”€โ”€ about.css            # About page specific styles
โ”‚   โ”‚   โ”œโ”€โ”€ contour_creator.css  # ContourCreator specific styles
โ”‚   โ”‚   โ”œโ”€โ”€ cloud_generator.css  # CloudGenerator specific styles
โ”‚   โ”‚   โ”œโ”€โ”€ examples.css         # Examples gallery styles
โ”‚   โ”‚   โ””โ”€โ”€ privacy_notice.css   # Privacy page styles
โ”‚   โ”œโ”€โ”€ ๐Ÿ“œ js/                   # JavaScript modules
โ”‚   โ”‚   โ”œโ”€โ”€ contour_creator.js   # ContourCreator functionality
โ”‚   โ”‚   โ”œโ”€โ”€ cloud_generator.js   # CloudGenerator functionality
โ”‚   โ”‚   โ””โ”€โ”€ navbar.js            # Navigation components
โ”‚   โ”œโ”€โ”€ ๐Ÿ–ผ๏ธ images/               # Logos and assets
โ”‚   โ””โ”€โ”€ ๐Ÿ“Š examples/             # Sample data files
โ”œโ”€โ”€ ๐Ÿ“ uploads/                  # Temporary file storage
โ”œโ”€โ”€ ๐Ÿ“ output/                   # Generated results
โ””โ”€โ”€ ๐Ÿ“ logs/                     # Application logs

Core Modules

Flask Application (app.py)

  • Web Framework: Flask-based REST API
  • File Management: Upload handling and cleanup
  • Image Processing: OpenCV integration for segmentation
  • Async Processing: Background task management
  • Logging System: Professional logging with rotation

Cloud Generation (cloud_generation.py)

  • Advanced Distribution Algorithms: Regular and Natural Distributions
  • Multi-region Processing: Intelligent boundary data processing for mGFD method
  • Node Classification: Interior/boundary/interface detection with automatic classification
  • Visualization: High-quality PNG/SVG output with statistical analysis

Point Reduction (reduce_points.py)

  • Multiple Reduction Algorithms: Uniform, Multiple, and Filtered reduction methods
  • Quality Preservation: Maintains geometric integrity while reducing point density
  • Flexible Configuration: Customizable reduction parameters for different use cases

Contour Detection (contour_detection.py)

  • Optimized Algorithms: Fast Flood Fill and Adaptive Tolerance for real-time detection
  • Brush-based Refinement: Manual editing tools for precise boundary adjustment
  • Multi-format Support: Comprehensive image format compatibility (PNG, JPG, TIFF, etc.)
  • Interactive Refinement: Seed-based region modification

Frontend (static/)

  • Modular CSS: Clean, maintainable, and scoped styling architecture
  • Modern UI: Responsive design with CSS Grid/Flexbox
  • Interactive Canvas: HTML5 Canvas with zoom/pan capabilities
  • Real-time Updates: WebSocket-like status monitoring

๐Ÿค Contributing

We welcome contributions from the research community! Here's how you can help:

๐Ÿ› Bug Reports

  1. Search Existing Issues: Check if the bug has been reported
  2. Create Detailed Report: Include steps to reproduce, expected vs actual behavior
  3. Provide Context: Operating system, Python version, browser details
  4. Include Logs: Attach relevant log files from the logs/ directory

๐Ÿ’ก Feature Requests

  1. Describe the Feature: Clear description of the proposed functionality
  2. Justify the Need: Explain how it benefits the research community
  3. Provide Examples: Include use cases and expected behavior

๐Ÿ’ป Code Contributions

Development Setup

# Fork the repository
git clone https://github.com/yourusername/CloudGen.git
cd CloudGen

# Create development environment
python -m venv dev_env
source dev_env/bin/activate
pip install -r requirements.txt

# Create feature branch
git checkout -b feature/your-feature-name

Coding Standards

  • Python Style: Follow PEP 8 guidelines
  • Documentation: Include comprehensive docstrings
  • Testing: Add unit tests for new functionality

๐Ÿ‘ฅ Research Team

๐ŸŒŸ Meet Our Research Team

Interdisciplinary experts advancing meshless computational methods


๐Ÿ”ฌ Principal Researchers

Dr. Gerardo Tinoco-Guerrero

Dr. Gerardo Tinoco-Guerrero
Principal Researcher & Project Director

Email ORCID ResearchGate

Dr. Josรฉ Alberto Guzmรกn-Torres

Dr. Josรฉ Alberto Guzmรกn-Torres
Co-Researcher & Technical Lead

Email ORCID ResearchGate

Dr. Francisco Javier Domรญnguez-Mota

Dr. Francisco Javier Domรญnguez-Mota
Co-Researcher & Mathematical Advisor

Email ORCID ResearchGate

๐ŸŽ“ Academic Credentials & Expertise

๐Ÿ‘จโ€๐Ÿ”ฌ Researcher ๐Ÿ“š Degree ๐ŸŽฏ Specialization ๐Ÿ† Key Contributions
Dr. Gerardo Tinoco-Guerrero Ph.D. Physical Engineering Sciences Meshless Methods, Numerical Analysis Project leadership, algorithm design, scientific direction
Dr. Josรฉ Alberto Guzmรกn-Torres Ph.D. Physical Engineering Sciences Artifitial Intelligence Applications, Software Development Technical implementation, code optimization, validation
Dr. Francisco Javier Domรญnguez-Mota Ph.D. Mathematical Sciences Applied Mathematics, Applied Numerical Methods Mathematical rigor, theoretical foundations, algorithm validation

๐ŸŽ“ Graduate Research Students

โญ Ph.D. Candidates

Gabriela Pedraza-Jimรฉnez

Gabriela Pedraza-Jimรฉnez
PhD

Eli Chagolla-Inzunza

Eli Chagolla-Inzunza
PhD

๐Ÿš€ M.Sc. Students

Jorge L. Gonzรกlez-Figueroa

Jorge L. Gonzรกlez-Figueroa
MSc

Christopher N. Magaรฑa-Barocio

Christopher N. Magaรฑa-Barocio
MSc


๐ŸŒŸ Research Excellence

  • ๐Ÿ”ฌ Interdisciplinary Approach: Combining mathematics, engineering, and computer science
  • ๐Ÿ“š Academic Affiliation: Universidad Michoacana de San Nicolรกs de Hidalgo (UMSNH)
  • ๐Ÿ† Research Impact: Advancing meshless methods for scientific computing
  • ๐Ÿค Collaborative Spirit: Open-source development and knowledge sharing
  • ๐ŸŒ International Reach: Contributing to global scientific community

๐Ÿค Commercial Sponsors

๐ŸŒŸ Industry Partners Supporting Innovation

Commercial partnerships driving practical applications of computational mathematics


๐Ÿญ SIIIA MATH

Artificial Intelligence Engineering Solutions

Website Type Location

๐ŸŽฏ Specialization:

  • Artificial Intelligence Solutions
  • Mathematical Modeling & Simulation
  • Engineering Innovation & Consulting
  • Computational Methods Development

๐Ÿ† Partnership Impact:

  • 12+ years of industry experience
  • 15+ successful AI/ML projects
  • Cutting-edge technology development
  • Real-world application of research

๐Ÿ’ผ Collaboration Areas:

  • Algorithm optimization for industry
  • Technology transfer initiatives
  • Student internship programs
  • Joint research projects

๐Ÿš€ Partnership Benefits

๐Ÿ’ก Innovation ๐Ÿค Collaboration ๐Ÿ“ˆ Growth ๐ŸŒ Impact
Cutting-edge research Strategic partnerships Continuous development Industry applications
Advanced algorithms Knowledge sharing Skill enhancement Technology transfer
Practical solutions Resource optimization Career opportunities Market innovation

๐Ÿ† Sponsor Recognition

We deeply appreciate the trust and support of our commercial sponsors who believe in advancing computational mathematics and bringing research to real-world applications.

๐Ÿค Partnership Opportunities: Interested in supporting cutting-edge research with commercial applications? Contact us to explore collaboration possibilities.

- ๐ŸŒŸ **Impact**: Fostering collaboration between academia and industry

Publications

No related publications yet. Research is ongoing and publications are in preparation.


๐Ÿ“ Citation & License

Citation

If you use mGFD CloudGenerator in your research, please cite:

@software{tinoco2025mGFD,
  title={mGFD CloudGenerator 2.0: Advanced Web Platform for Generating Unstructured Clouds of Points},
  author={Tinoco-Guerrero, Gerardo and Dom\'{i}nguez-Mota, Francisco Javier and Guzm\'{a}n-Torres, Jos\'{e} Alberto},
  year={2025},
  url={https://github.com/gstinoco/CloudGen},
  version={2.0}
}

License

This project is licensed under the MIT License - see the LICENSE file for details.

MIT License

Copyright (c) 2025 Gerardo Tinoco-Guerrero

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

๐Ÿ™ Acknowledgments

โค๏ธ Special Thanks

We extend our heartfelt gratitude to the organizations, communities, and individuals who have made this project possible


๐Ÿ›๏ธ Institutional Support

๐ŸŽ“ Universidad Michoacana de San Nicolรกs de Hidalgo (UMSNH)

Our home institution providing academic foundation and research infrastructure

Website Founded

  • ๐Ÿ›๏ธ Institutional Support: Research facilities and academic resources
  • ๐Ÿ‘ฅ Faculty Support: Mentorship and guidance from distinguished professors
  • ๐Ÿ“š Academic Environment: Fostering innovation and scientific excellence
  • ๐Ÿ”ฌ Research Infrastructure: Computational resources and laboratory access

๐Ÿ›๏ธ SECIHTI

Secretariat of Science, Humanities, Technology and Innovation

Website Type

  • ๐Ÿ‡ฒ๐Ÿ‡ฝ Government Support: Promoting science and technology in Mexico
  • ๐Ÿ’ก Innovation Funding: Supporting research and development initiatives
  • ๐ŸŒŸ National Impact: Advancing Mexico's scientific capabilities
  • ๐Ÿ“Š Policy Development: Shaping national science and technology policies

:building_with_garden: Research Centers & Collaborations

๐Ÿซ Aula CIMNE-Morelia

Centro Internacional de Mรฉtodos Numรฉricos en Ingenierรญa

Website

๐Ÿ”ฌ Research Excellence: International center for numerical methods in engineering
๐Ÿค Collaboration: Fostering international research partnerships
๐Ÿ“ˆ Innovation: Advancing computational methods and engineering solutions


๐Ÿ’ป Technology Communities

๐Ÿ“ฆ Framework ๐Ÿ‘ฅ Community โญ Contribution
OpenCV OpenCV Community Computer vision and image processing tools
Flask Flask Development Team Lightweight and powerful web framework
Python Scientific Python Community NumPy, SciPy, Matplotlib, and Pandas
Shapely Shapely Development Team Computational geometry capabilities

๐ŸŒ Global Research Community

๐ŸŒ International Collaboration

  • Research Networks: Global partnerships in computational mathematics
  • Open Source Spirit: Collaborative development and knowledge sharing
  • Academic Exchange: International conferences and publications
  • Peer Review: Constructive feedback from the scientific community

๐Ÿ™ Special Recognition

  • Beta Testers: Early adopters who provided valuable feedback
  • Contributors: Developers who enhanced the codebase
  • Educators: Teachers using this tool in their courses
  • Students: The next generation of computational scientists

โœจ Community Impact

This project exists because of the collective effort of researchers, developers, and educators worldwide. Together, we advance the frontiers of computational science and make powerful tools accessible to everyone.

Community Open Source Science


๐Ÿ“ง Contact & Support

๐ŸŽ“ Academic Inquiries

Research Collaboration

  • Email: gerardo.tinoco@umich.mx
  • Institution: Michoacan University of Saint Nicholas of Hidalgo
  • Topics: Meshless methods, numerical analysis, scientific computing

๐Ÿค Community

Stay Connected

  • GitHub: Follow the repository for updates
  • Research Gate: Connect with the research team
  • Academic Networks: Find us on academic social platforms

โ“ FAQ

Common Questions

Q: What file formats are supported for images? A: PNG, JPG, JPEG, GIF, and BMP formats up to 10MB.

Q: Can I use this for commercial applications? A: Yes, the MIT license allows commercial use with proper attribution.

Q: How do I cite this work in my research? A: Use the BibTeX citation provided in the Citation section.

Q: Is there a limit on the number of points generated? A: The limit depends on your system memory. The tool is optimized for large datasets.

Q: Can I contribute new algorithms? A: Absolutely! We welcome contributions. Please see the Contributing section.


Advancing meshless methods through open-source collaboration

GitHub stars GitHub forks GitHub watchers

About

Advanced Web Platform for Generating Unstructured Clouds of Points

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •