###### html绘制五角星。。
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>canvas绘制五角星 </title>
<script type="text/javascript" >
window.onload = function () {
var canvas = document.getElementById("canvas");

if (canvas) {
var context = canvas.getContext("2d");
drawStar(context, 150, 500, 200);
} else {
document.writeln("浏览器不支持canvas组件");
}
}
function drawStar(context, r, x, y) {
context.lineWidth = 5;
context.beginPath();
var dit = Math.PI * 4 / 5;
var sin = Math.sin(0) * r + y;
var cos = Math.cos(0) * r + x;
console.log(0+":"+0);
context.moveTo(cos, sin);
for (var i = 0; i < 5; i++) {
var tempDit = dit * i;
sin = Math.sin(tempDit) * r + y;
cos = Math.cos(tempDit) * r + x;
context.lineTo(cos, sin);
console.log(sin+":"+sin+":"+tempDit);
}
context.closePath();
context.strokeStyle = "red";
context.fillStyle = "#DDDDDD";
context.fill();
}
</script>
</head>
<body>
<canvas width="1000" height="1000" id="canvas" ></canvas>
</body>

</html>

#### HTML5-画一个简单五角星

2011-03-30 13:20:00

#### 利用html5画出五角星画出星空

2014-11-17 20:26:35

#### canvas五角星（五星红旗）绘制

2017-05-20 15:18:42

#### 【HTML5】五角星

2016-12-16 21:32:45

#### canvas画五角星

2016-06-30 22:02:16

#### Android OpenGL ES绘制小圆点

2018-01-13 23:17:16

#### HTML 五角星 -- CSS

2017-02-19 15:56:00

#### HTML 五角星 -- SVG

2017-02-21 23:50:42

#### HTML Canvas 绘制五角星

2012-07-30 17:05:43

#### canvas绘制一个五角星-常用绘图原理

2017-05-01 10:27:17

html绘制五角星。。