[PR #557] [MERGED] [enhancement] New Graphics implementation with algorithm for spirograph #982

Open
opened 2026-01-29 15:16:36 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/TheAlgorithms/C/pull/557
Author: @kvedala
Created: 7/4/2020
Status: Merged
Merged: 7/10/2020
Merged by: @kvedala

Base: masterHead: graphics/spirograph


📝 Commits (10+)

📊 Changes

5 files changed (+423 additions, -34 deletions)

View changed files

📝 .gitpod.dockerfile (+9 -7)
📝 CMakeLists.txt (+35 -27)
📝 DIRECTORY.md (+3 -0)
graphics/CMakeLists.txt (+88 -0)
graphics/spirograph.c (+288 -0)

📄 Description

Description of Change

  • Implementation to generate curves of spirograph
  • Functions to plot curve resulting from the specs to a CSV file that can be read and plotted
  • Function to check for OpenGL and GLUT libraries to create a window and perform animation of the curves for various input parameters.
  • Gitpod
    • Enable graphics compilation
    • Enable VNC to view GUI

Implementation tested with and without OpenGL on Windows, Linux and MacOS.
Note that this can run without OpenGL. If GLUT library is available, will automatically compile for OpenGL.

See the analogous pull request for more details and discussion

References

Checklist

  • Added description of change
  • Added file name matches File name guidelines
  • Added tests and example, test must pass
  • Relevant documentation/comments is changed or added
  • PR title follows semantic commit guidelines
  • Search previous suggestions before making a new one, as yours may be a duplicate.
  • I acknowledge that all my contributions will be made under the project's license.

Notes:

Should this be considered as an algorithm for this repo?


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/TheAlgorithms/C/pull/557 **Author:** [@kvedala](https://github.com/kvedala) **Created:** 7/4/2020 **Status:** ✅ Merged **Merged:** 7/10/2020 **Merged by:** [@kvedala](https://github.com/kvedala) **Base:** `master` ← **Head:** `graphics/spirograph` --- ### 📝 Commits (10+) - [`fd2e1b1`](https://github.com/TheAlgorithms/C/commit/fd2e1b1af355398fbbdc1f60d940c4c9517455d9) skeleton of spirograph - [`d80cc2a`](https://github.com/TheAlgorithms/C/commit/d80cc2afa9c9763fb2d80fd7111af7e50460105c) add graphics to cmake - [`ad013c6`](https://github.com/TheAlgorithms/C/commit/ad013c677c985348d50a016980d71832e8ad27cb) updating DIRECTORY.md - [`3544bc2`](https://github.com/TheAlgorithms/C/commit/3544bc28eb14855b412d01ad60c5693daa6bbfa4) added cmake to graphics folder - [`6cfe6ca`](https://github.com/TheAlgorithms/C/commit/6cfe6ca43e8533cd04e48ee814a5ad4fcfc59fe8) add stub test function - [`fd4ac94`](https://github.com/TheAlgorithms/C/commit/fd4ac944c9966fafcf619b29c930717356a9c4f7) working program - [`3737bd7`](https://github.com/TheAlgorithms/C/commit/3737bd7eca54caaf98ac66137d1c783c03afbace) set pre-processor macro if GLUT is available - [`97eb876`](https://github.com/TheAlgorithms/C/commit/97eb876a81b2863e0745ab92a1c58cdd23c9801b) use snprintf - [`804ffd6`](https://github.com/TheAlgorithms/C/commit/804ffd6bea7b3cb2670d2553d2aa0a138ebeccdd) conditional include for mac - [`1580fa4`](https://github.com/TheAlgorithms/C/commit/1580fa42f8b2f1fcd630d5cb7c4df7b6048fa168) corrected conditional include for mac ### 📊 Changes **5 files changed** (+423 additions, -34 deletions) <details> <summary>View changed files</summary> 📝 `.gitpod.dockerfile` (+9 -7) 📝 `CMakeLists.txt` (+35 -27) 📝 `DIRECTORY.md` (+3 -0) ➕ `graphics/CMakeLists.txt` (+88 -0) ➕ `graphics/spirograph.c` (+288 -0) </details> ### 📄 Description #### Description of Change <!-- Thank you for your Pull Request. Please provide a description above and review the requirements below. Contributors guide: https://github.com/TheAlgorithms/C-Plus-Plus/CONTRIBUTING.md --> * Implementation to generate curves of spirograph * Functions to plot curve resulting from the specs to a CSV file that can be read and plotted * Function to check for OpenGL and GLUT libraries to create a window and perform animation of the curves for various input parameters. * Gitpod * Enable graphics compilation * Enable VNC to view GUI Implementation tested with and without OpenGL on Windows, Linux and MacOS. Note that this can run without OpenGL. If GLUT library is available, will automatically compile for OpenGL. See [the analogous pull request](https://github.com/TheAlgorithms/C-Plus-Plus/pull/936) for more details and discussion #### References <!-- Add any reference to previous pull-request or issue --> #### Checklist <!-- Remove items that do not apply. For completed items, change [ ] to [x]. --> - [x] Added description of change - [x] Added file name matches [File name guidelines](https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/CONTRIBUTING.md#New-File-Name-guidelines) - [x] Added tests and example, test must pass - [x] Relevant documentation/comments is changed or added - [x] PR title follows semantic [commit guidelines](https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/CONTRIBUTING.md#Commit-Guidelines) - [x] Search previous suggestions before making a new one, as yours may be a duplicate. - [x] I acknowledge that all my contributions will be made under the project's license. #### Notes: <!-- Please add a one-line description for developers or pull request viewers --> Should this be considered as an algorithm for this repo? <a href="https://gitpod.io/#https://github.com/TheAlgorithms/C/pull/557"><img src="https://gitpod.io/api/apps/github/pbs/github.com/kvedala/C.git/663046ff8a5a08cbc9bdb306121d536c1ee00a5d.svg" /></a> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-29 15:16:36 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/C#982