Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » 3-d sphere trouble
- REd_FoX50213
- Scratcher
11 posts
3-d sphere trouble
I'm having a lot of trouble using a stamping technique I found in a 3-d CRT tv, and when trying to make a sphere, I have been failing to do so, and getting this:
https://scratch.mit.edu/projects/990409817/
Could someone please let me know of an alternative way?
Also, I want to find out how to actually move the camera around the entire thing, and i haven't found a way to do that.
https://scratch.mit.edu/projects/990409817/
Could someone please let me know of an alternative way?
Also, I want to find out how to actually move the camera around the entire thing, and i haven't found a way to do that.
If bananas are apples, then the apples' bananas are apples, so therefore the apples are eating apples, meaning that the apples are cannibals.
- BigNate469
- Scratcher
500+ posts
3-d sphere trouble
You can try increasing
Also, spheres are hard to draw. Because of their unique geometry, there is no cross-section you can take of a sphere that isn't a perfect circle, and thus all spheres in 3D simulations with a 2-dimensional screen will appear as circles. The best way to differentiate between a circle and a sphere is to add lighting and shadows.
One more thing: because of the way you are simulating 3-dimensional space, rotation will be difficult. You are not recreating 3 dimensions and then rendering it onto a 2-dimensional screen, you are creating the illusion of 3 dimensions by drawing things in a specific way on a two-dimensional screen.
(size)to something like 40. However, this gives you a cylinder.
Also, spheres are hard to draw. Because of their unique geometry, there is no cross-section you can take of a sphere that isn't a perfect circle, and thus all spheres in 3D simulations with a 2-dimensional screen will appear as circles. The best way to differentiate between a circle and a sphere is to add lighting and shadows.
One more thing: because of the way you are simulating 3-dimensional space, rotation will be difficult. You are not recreating 3 dimensions and then rendering it onto a 2-dimensional screen, you are creating the illusion of 3 dimensions by drawing things in a specific way on a two-dimensional screen.
Last edited by BigNate469 (March 27, 2024 15:46:22)
Highlight any part of this signature and press ctrl+shift+down arrow to see the rest of it
foreverPlease read the list of Officially Rejected Suggestions before posting a suggestion for Scratch! 100th post
if <person asks [what's a signature] :: sensing> then
Redirect to [https://en.scratch-wiki.info/wiki/Signature] :: motion
end
end
This signature is designed to be as helpful as possible.
View all of the topics you've posted in:
https://scratch.mit.edu/discuss/search/?action=show_user&show_as=topics
View all of your posts:
https://scratch.mit.edu/discuss/search/?action=show_user&show_as=posts
Forum tips:
Don't title topics something like “HELP ME!!!”. It's not helpful, and won't get you as many responses.
Don't post in topics where the latest post is over ~2 months old, unless you have something critical to add. Especially in topics that are several years old- it isn't helpful, and is known as necroposting.
Don't post unrelated things in topics, including questions of your own. Make a new topic for your questions.
You can use the
[code] and [/code]
You can use the
[color=color name or hexadecimal value here] and [/color]
Little-known Scratch URLs:
scratch.pizza (redirects to main page)
https://scratch.mit.edu/projects/PROJECT ID HERE/remixtree (replace “PROJECT ID HERE” with project id number. Shows all the remixes of the project, and the remixes of those projects, and the remixes of those projects, and so on, as a chart. Link currently redirects to one of my projects)
- REd_FoX50213
- Scratcher
11 posts
3-d sphere trouble
I have however, actually found out that to calculate 3-d distance all you need is
set [ 3-d distance ] to ((((x) + (y)) + (z))/ (3))and that
set x to (((x)+(z))/([ abs] of (z)))is needed to calculate how z affects how x works, and switch out the x for y to calculate that.
If bananas are apples, then the apples' bananas are apples, so therefore the apples are eating apples, meaning that the apples are cannibals.
- REd_FoX50213
- Scratcher
11 posts
3-d sphere trouble
and yeah, rotation is hard, because you need to account for the fact that the more parallel you look at something, the more it becomes squished. I'm currently figuring out how to store positions and then play them back using lists, but the problem is finding out how to use the z axis too, and i'm a bit stuck on that.
If bananas are apples, then the apples' bananas are apples, so therefore the apples are eating apples, meaning that the apples are cannibals.
- Coding3dnow
- Scratcher
15 posts
3-d sphere trouble
the formula you are using is inaccurate instead try using something I have however, actually found out that to calculate 3-d distance all you need isset [ 3-d distance ] to ((((x) + (y)) + (z))/ (3))and thatset x to (((x)+(z))/([ abs] of (z)))is needed to calculate how z affects how x works, and switch out the x for y to calculate that.
set [3-d dis ] to ([sqrt ] of ()(((((x1) - (x2)) * ((x1) -(x2))) + (((y1) - (y2)) * ((y1) -(y2)))) + (((z1) - (z2)) * ((z1) -(z2)))))[] like this
scratch = 3d = true
- Discussion Forums
- » Help with Scripts
- » 3-d sphere trouble