- Trending Categories
- Data Structure
- Operating System
- MS Excel
- C Programming
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to draw sine waves with HTML5 SVG?
To draw sine waves with SVG, use the following that closely approximates half of a sine wave. I have used a cubic-bezier approximation. Use the <path> element.
<!DOCTYPE html> <html> <head> <title>SVG</title> <meta charset = "utf-8" /> </head> <body> <h2 align = "center">HTML5 SVG Sine Waves</h2> <svg width = "150px" height = "200px" viewBox = "0 0 100 100"> <path stroke = "#00FF00" fill = "none" d = "M0,0 C36.42,0,70.58,100,100,100" /> </svg> </body> </html>
- Related Articles
- Drawing sine waves with HTML5
- How to draw SVG Logo in HTML5?
- How to draw a rectangle in HTML5 SVG?
- How to draw a polygon in HTML5 SVG?
- How to draw a polyline in HTML5 SVG?
- How to draw a star in HTML5 SVG?
- How to draw shapes using SVG in HTML5?
- How to draw grid using HTML5 and canvas or SVG?
- How to draw an SVG file on an HTML5 canvas?
- How to work with Scalable Vector Graphics (SVG) in HTML5?
- How to use SVG images in HTML5?
- Make a star shape with HTML5 SVG
- How to draw a hollow circle in SVG?
- How to draw a Bezier Curve with HTML5 Canvas?
- How to draw a line with lineTo() in HTML5?