Play Home Contribute Github Join Us! Discourse Staff Members Github Contribution Guides Team

What in Carnation - Feedback


#24

Ok, thank you. I changed the distance between spiral center and star point, and it gone allright.


#25

Im stuck on the cube.
The size of 10 as told looks bigger than whats in the picture.


#26

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?

#27

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


#28

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.


#29

Ohhhh, its one polygon and one spoooke, I see it now. Thanks


#30

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???


#31

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?


#32

sorry for disturbing ,i might get where my problem is ,

i dont know the meaning of the shape …

i need a dictionary first…


#33

Can’t work it out …full of tears in my eyes…

%>_<%


#34

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?


#35

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…


#36

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)


#38

Please do not post correct code, as it gives the answer without making the player work.

If you have an issue, private message Nick.


#39

can you raise the time limit?
i am doing it , seems right, but the time restraint is killing me up…


#40

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.


#41

really? but i still dont know why it isnt working, the solution and what i drew seems identical!


#42

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.)


#43

2 points wrongly up, thank you :smiley:


#44

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)