Ok, thank you. I changed the distance between spiral center and star point, and it gone allright.
Im stuck on the cube.
The size of 10 as told looks bigger than whats in the picture.
I see a few things that might be off:
- your box, as mentioned, looks too big
- the side lengths of your polygon look different. Did you use âdrawPolygonâ and âdrawSpokesâ as recommended?
- your box doesnât look centered on the red X. Did you use the provided coordinates for the X?
I used one polygon for the square on top, followed by five spokes.
The size being 10 for all, except the bottom 2 spokes that point outward, they needed to be longer
Yes i used redX.x and redX.y + 10 to move it higher
Cool, looks nice.
I wish there was some easy way to check to see if you produce a proper shape, without having to specify exactness. As you did it in a way completely different than I had in mind. Because of the way you did it you probably canât ever get it to hit the spots Iâm checking to see if you âdid it rightâ. Your box-top is bigger relative to the rest of the box (the top of âmineâ isnât a square, tâis a rhombus just not a square).
Mine is made only from the commented out function calls, iow:
1 polygon
1 spokes
and the bib from:
1 star
2 spirals.
Hmm, I if/when I have time Iâll think more about how to check for success in a general way.
Ohhhh, its one polygon and one spoooke, I see it now. Thanks
Changing Math.sign to Math.sin worked for me. Thanks ChronistGiver!
Vlevo, I tried my best not to change the code, but kept running into the same undefined is not a function that zuf got. Could it be a Python version issue???
i swear i dont know how to draw things like thisâŚomgâŚ
why !!!
would you please tell me how ,i mean would you please send me your code?
sorry for disturbing ,i might get where my problem is ,
i dont know the meaning of the shape âŚ
i need a dictionary firstâŚ
Canât work it out âŚfull of tears in my eyesâŚ
%>_<%
We do not give out correct code as a regular policy. It gives a easy answer without any learning required.
Which shape do you need help with?
thanks!
well, i got the code of drawing a circle and a square in the level " the geometry of flowers"
but⌠in this level " what in carnation"âŚ
i am trying to learn those shapes which were already givenâŚ
with the shapeâŚpoly star
i donât understand what is skipâŚsorryâŚi only know itâs .âpass a little when readingâ
i ran the code below,i changed the numbers many times but comes an error
var twoPi = 2 * Math.PI;
this.setFlowerColor("red");
this.drawPolyStars = function(center, radius, sides, skips, startAngle) {
this.toggleFlowers(false);
var angle = startAngle;
var x = center.x;
var y = center.y;
var hoops = skips + 1;
var stepAngle = hoops * (twoPi / sides);
if(skips !== 0 && (sides % hoops) === 0) {
hoops = skips;
}
var endAngle = (twoPi * hoops) + startAngle;
while(angle <= endAngle) {
var newX = x + radius * Math.cos(angle);
var newY = y + radius * Math.sin(angle);
this.moveXY(newX, newY);
this.toggleFlowers(true);
angle += stepAngle;
}
};
var RedX={x:28,y:36};
this.drawPolyStars(RedX, 10, 6, 16, 30);
the most horrible thing is the error named itself unhandled errorâŚi feel so stressfulâŚ
Why you are getting the strange error . . . no idea�??..
What âskipsâ means:
Notice in my image, that the function drawPolygon calls drawPolyStars with a default skips=0.
And in the commented copy and paste from drawStars, it calls drawPolyStars with some value.
Both shapes are drawn Start, 1, 2, 3, 4, end but the vertices are hit in a different order, in essence the pentagram skips polygon vertices (coming back later and getting the ones it skipped before)
Please do not post correct code, as it gives the answer without making the player work.
If you have an issue, private message Nick.
can you raise the time limit?
i am doing it , seems right, but the time restraint is killing me upâŚ
Actually, the time limit is not really running out. What is happening is that the level already knows your code is wrong, so it stops early to prevent you from watching your character stand there until time runs out.
Your bib outline is probably not attached to the star, exactly, you are probably one high or one low (in this case I think you are high, if your star is centered correctly.)
2 points wrongly up, thank you
Weirdly my bib is alright but my 3D box does not get validated.
Every thing look as on the help.
What is wrong with my box code, please:
#setFlowerColor
self.setFlowerColor("red")
center = redX
size = 10
sides = 6
startAngle = 0.5
spokes = 3
#drawPolygon
drawPolygon(center, size, sides, startAngle)
#drawSpokes
drawSpokes(center, size, spokes, startAngle)