Discuss Scratch

P444
Scratcher
500+ posts

How to draw a heart with pen?

So uh yeah… It is a nightmare that I COMPLETELY forgot trigonometry!!
How do you draw a heart with pen from point A to B. Illustration:

Thanks! <3
TechyTester
Scratcher
74 posts

How to draw a heart with pen?

Perhaps you could try finding a circle script, stopping it at a certain, adding a “V” shape at the top, and redoing it at the other side? I don't have any examples tho, sry XD
P444
Scratcher
500+ posts

How to draw a heart with pen?

TechyTester wrote:

Perhaps you could try finding a circle script, stopping it at a certain, adding a “V” shape at the top, and redoing it at the other side? I don't have any examples tho, sry XD
Gonna try it. Though I doubt that the top sides of the heart are semi-circles/ellipses…

Edit: Ok… That went horribly wrong D:

Last edited by P444 (Feb. 21, 2017 15:17:22)

P444
Scratcher
500+ posts

How to draw a heart with pen?

Found this:

I have a liiiitle question. What does |x| represent?
deck26
Scratcher
1000+ posts

How to draw a heart with pen?

It's the absolute value of x.
P444
Scratcher
500+ posts

How to draw a heart with pen?

deck26 wrote:

It's the absolute value of x.
Thanks!!! Now I can start with the equations!
I still have no idea why I don't remember any of these :/
NitroCipher
Scratcher
500+ posts

How to draw a heart with pen?

Hey, I just threw this together.

https://scratch.mit.edu/projects/146398300
P444
Scratcher
500+ posts

How to draw a heart with pen?

NitroCipher wrote:

Hey, I just threw this together.

https://scratch.mit.edu/projects/146398300
Nice! Question though, how would you draw it from point A to B (as illustrated on the first post)?

Mean while I got a neat little equation, but suffers the same issue. How do I center it around point A and B??
The basic heart: https://scratch.mit.edu/projects/146403009/
x=16sin^3(t)
y=13cos(t)-6cos(2t)-2cos(3t)-(-1cos(4t))
deck26
Scratcher
1000+ posts

How to draw a heart with pen?

If the centre has coords x and y then all movement needs adjusting for that. If you have a function y=f(x) you'd instead use y=ycentre + f(x - xcentre).

I think that's right.
NitroCipher
Scratcher
500+ posts

How to draw a heart with pen?

P444 wrote:

NitroCipher wrote:

Hey, I just threw this together.

https://scratch.mit.edu/projects/146398300
Nice! Question though, how would you draw it from point A to B (as illustrated on the first post)?

Mean while I got a neat little equation, but suffers the same issue. How do I center it around point A and B??
The basic heart: https://scratch.mit.edu/projects/146403009/
x=16sin^3(t)
y=13cos(t)-6cos(2t)-2cos(3t)-(-1cos(4t))

What do you mean by from point A to B? Where would these points fall on the heart?
P444
Scratcher
500+ posts

How to draw a heart with pen?

deck26 wrote:

If the centre has coords x and y then all movement needs adjusting for that. If you have a function y=f(x) you'd instead use y=ycentre + f(x - xcentre).

I think that's right.
Hope I understood that correctly!

NitroCipher wrote:

P444 wrote:

NitroCipher wrote:

Hey, I just threw this together.

https://scratch.mit.edu/projects/146398300
Nice! Question though, how would you draw it from point A to B (as illustrated on the first post)?

Mean while I got a neat little equation, but suffers the same issue. How do I center it around point A and B??
The basic heart: https://scratch.mit.edu/projects/146403009/
x=16sin^3(t)
y=13cos(t)-6cos(2t)-2cos(3t)-(-1cos(4t))

What do you mean by from point A to B? Where would these points fall on the heart?
Let's say 4 points instead of 2. Join them and you get a square/rectangle, the heart should be inside the square/rectangle, centering on it.
deck26
Scratcher
1000+ posts

How to draw a heart with pen?

For @NitroCipher's version you'd need to replace the goto 0,0 with the coords between A and B (average of Ax and Bx, average of Ay and By) since all the moves are relative other than the two goto's.
deck26
Scratcher
1000+ posts

How to draw a heart with pen?

deck26
Scratcher
1000+ posts

How to draw a heart with pen?

deck26 wrote:

https://scratch.mit.edu/projects/146406839/
Box added now.
P444
Scratcher
500+ posts

How to draw a heart with pen?

deck26 wrote:

If the centre has coords x and y then all movement needs adjusting for that. If you have a function y=f(x) you'd instead use y=ycentre + f(x - xcentre).

I think that's right.
Thank you! Those equations gave me the idea I was looking for! I have almost got exactly what I needed https://scratch.mit.edu/projects/146403009/#player
Will play around with the values a bit. Thank you to everyone who helped me!
deck26
Scratcher
1000+ posts

How to draw a heart with pen?

I've added scaling to my remix.

Happy to delete my remix when you're happy you have what you want.
P444
Scratcher
500+ posts

How to draw a heart with pen?

deck26 wrote:

I've added scaling to my remix.

Happy to delete my remix when you're happy you have what you want.
I think I am ok with the results now. Also, why delete the remix? Somebody may stumble upon something similar, and need that!
Thanks again
crazycatlady20
Scratcher
31 posts

How to draw a heart with pen?

P444 wrote:

So uh yeah… It is a nightmare that I COMPLETELY forgot trigonometry!!
How do you draw a heart with pen from point A to B. Illustration:

Thanks! <3

just generally how to draw a heart using pen, simple please, i'm new. i want to use this in a project im currently working on i dunno how
deck26
Scratcher
1000+ posts

How to draw a heart with pen?

crazycatlady20 wrote:

P444 wrote:

So uh yeah… It is a nightmare that I COMPLETELY forgot trigonometry!!
How do you draw a heart with pen from point A to B. Illustration:

Thanks! <3

just generally how to draw a heart using pen, simple please, i'm new. i want to use this in a project im currently working on i dunno how
What's wrong with the solutions above?

if you still need help please create your own new topic rather than necroposting.
UniversalWolfCrystal
Scratcher
4 posts

How to draw a heart with pen?

hlp! TmT I dont understand! ;w;
_________________________________________________

Hello!

Powered by DjangoBB