<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
	<id>http://digida.mgpu.ru/index.php?action=history&amp;feed=atom&amp;title=How_to_Create_a_Sphere_with_Pen</id>
	<title>How to Create a Sphere with Pen - История изменений</title>
	<link rel="self" type="application/atom+xml" href="http://digida.mgpu.ru/index.php?action=history&amp;feed=atom&amp;title=How_to_Create_a_Sphere_with_Pen"/>
	<link rel="alternate" type="text/html" href="http://digida.mgpu.ru/index.php?title=How_to_Create_a_Sphere_with_Pen&amp;action=history"/>
	<updated>2026-05-20T06:55:46Z</updated>
	<subtitle>История изменений этой страницы в вики</subtitle>
	<generator>MediaWiki 1.44.0</generator>
	<entry>
		<id>http://digida.mgpu.ru/index.php?title=How_to_Create_a_Sphere_with_Pen&amp;diff=1742&amp;oldid=prev</id>
		<title>Patarakin: 1 версия импортирована</title>
		<link rel="alternate" type="text/html" href="http://digida.mgpu.ru/index.php?title=How_to_Create_a_Sphere_with_Pen&amp;diff=1742&amp;oldid=prev"/>
		<updated>2022-07-21T08:33:15Z</updated>

		<summary type="html">&lt;p&gt;1 версия импортирована&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ru&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Предыдущая версия&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Версия от 11:33, 21 июля 2022&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;4&quot; class=&quot;diff-notice&quot; lang=&quot;ru&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(нет различий)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;!-- diff cache key digida:diff:1.41:old-1741:rev-1742 --&gt;
&lt;/table&gt;</summary>
		<author><name>Patarakin</name></author>
	</entry>
	<entry>
		<id>http://digida.mgpu.ru/index.php?title=How_to_Create_a_Sphere_with_Pen&amp;diff=1741&amp;oldid=prev</id>
		<title>scratch&gt;Ssvbxx: Sorted some things</title>
		<link rel="alternate" type="text/html" href="http://digida.mgpu.ru/index.php?title=How_to_Create_a_Sphere_with_Pen&amp;diff=1741&amp;oldid=prev"/>
		<updated>2022-01-31T22:17:35Z</updated>

		<summary type="html">&lt;p&gt;Sorted some things&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;This article explains &amp;#039;&amp;#039;&amp;#039;how to create a sphere with [[pen]]&amp;#039;&amp;#039;&amp;#039; in [[Scratch]].&lt;br /&gt;
&lt;br /&gt;
== The Process ==&lt;br /&gt;
&lt;br /&gt;
=== Method One: Using a Light Source ===&lt;br /&gt;
Step 1: Create a sprite which will be the &amp;quot;Light Source&amp;quot;, and create the pen sprite.&lt;br /&gt;
&lt;br /&gt;
Step 2: Create the following code in the pen sprite:&lt;br /&gt;
&amp;lt;scratchblocks&amp;gt;&lt;br /&gt;
when gf clicked&lt;br /&gt;
generate sphere of size (100)&lt;br /&gt;
&lt;br /&gt;
define generate sphere of size (sphere size)&lt;br /&gt;
set [v v] to [0]&lt;br /&gt;
repeat (sphere size)&lt;br /&gt;
  create circle of size (v)  // Remember to check the &amp;quot;run without screen refresh&amp;quot;!&lt;br /&gt;
  change [v v] by (0.01)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
define create circle of size (circle size)&lt;br /&gt;
repeat (360)&lt;br /&gt;
  pen down&lt;br /&gt;
  set pen color to (5) // The color of the sphere&lt;br /&gt;
  set pen (brightness v) to ((100)-(distance to [Light Source v]))&lt;br /&gt;
  turn right (1) degrees&lt;br /&gt;
  move (circle size) steps&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/scratchblocks&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Method Two: Pen Sprite Only ===&lt;br /&gt;
&lt;br /&gt;
Step 1: Create the pen sprite.&lt;br /&gt;
&lt;br /&gt;
Step 2: Do the same as Step 2, method 1, but replace the last script with this one:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;scratchblocks&amp;gt;&lt;br /&gt;
define create circle of size (circle size)&lt;br /&gt;
repeat (360)&lt;br /&gt;
  move (circle size) steps&lt;br /&gt;
  pen down&lt;br /&gt;
  set pen color to (5) // reddish orange&lt;br /&gt;
  set pen (brightness v) to ([sqrt v] of ((((center x) - (x position)) * ((center x) - (x position))) + (((center y) - (y position)) * ((center y) - (y position))))) // Remember, (center x) is the x position of where it will be shaded, and (center y) is the y position of where it will be shaded.&lt;br /&gt;
  turn right (1) degrees&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/scratchblocks&amp;gt;&lt;br /&gt;
===Method 3: Wireframe===&lt;br /&gt;
Another method for a wireframe 3d sphere is shown below:&lt;br /&gt;
&amp;lt;scratchblocks&amp;gt;&lt;br /&gt;
define go to (x :: custom-arg) (y :: custom-arg) (z :: custom-arg) (rc_x :: custom-arg) (rc_y :: custom-arg) (rc_z :: custom-arg) (r_x :: custom-arg) (r_y :: custom-arg) (r_z :: custom-arg) (cam_x :: custom-arg) (cam_y :: custom-arg) (cam_z :: custom-arg) (fs :: custom-arg)&lt;br /&gt;
go to x: ((((((((x :: custom-arg) - (rc_x :: custom-arg)) * ([cos v] of (r_y :: custom-arg))) - (((z :: custom-arg) - (rc_z :: custom-arg)) * ([sin v] of (r_y :: custom-arg)))) * ([cos v] of (r_z :: custom-arg))) - (((((y :: custom-arg) - (rc_y :: custom-arg)) * ([cos v] of (r_x :: custom-arg))) - (((((x :: custom-arg) - (rc_x :: custom-arg)) * ([sin v] of (r_y :: custom-arg))) + (((z :: custom-arg) - (rc_z :: custom-arg)) * ([cos v] of (r_y :: custom-arg)))) * ([sin v] of (r_x :: custom-arg)))) * ([sin v] of (r_z :: custom-arg)))) - (cam_x :: custom-arg)) * ((fs :: custom-arg) / ((fs :: custom-arg) + (((((y :: custom-arg) - (rc_y :: custom-arg)) * ([sin v] of (r_x :: custom-arg))) + (((((x :: custom-arg) - (rc_x :: custom-arg)) * ([sin v] of (r_y :: custom-arg))) + (((z :: custom-arg) - (rc_z :: custom-arg)) * ([cos v] of (r_y :: custom-arg)))) * ([cos v] of (r_x :: custom-arg)))) - (cam_z :: custom-arg))))) y: ((((((((x :: custom-arg) - (rc_x :: custom-arg)) * ([cos v] of (r_y :: custom-arg))) - (((z :: custom-arg) - (rc_z :: custom-arg)) * ([sin v] of (r_y :: custom-arg)))) * ([sin v] of (r_z :: custom-arg))) + (((((y :: custom-arg) - (rc_y :: custom-arg)) * ([cos v] of (r_x :: custom-arg))) - (((((x :: custom-arg) - (rc_x :: custom-arg)) * ([sin v] of (r_y :: custom-arg))) + (((z :: custom-arg) - (rc_z :: custom-arg)) * ([cos v] of (r_y :: custom-arg)))) * ([sin v] of (r_x :: custom-arg)))) * ([cos v] of (r_z :: custom-arg)))) - (cam_y :: custom-arg)) * ((fs :: custom-arg) / ((fs :: custom-arg) + (((((y :: custom-arg) - (rc_y :: custom-arg)) * ([sin v] of (r_x :: custom-arg))) + (((((x :: custom-arg) - (rc_x :: custom-arg)) * ([sin v] of (r_y :: custom-arg))) + (((z :: custom-arg) - (rc_z :: custom-arg)) * ([cos v] of (r_y :: custom-arg)))) * ([cos v] of (r_x :: custom-arg)))) - (cam_z :: custom-arg)))))&lt;br /&gt;
&lt;br /&gt;
define Loop&lt;br /&gt;
erase all&lt;br /&gt;
set [i v] to [0]&lt;br /&gt;
repeat (12)&lt;br /&gt;
  set [j v] to [90]&lt;br /&gt;
  repeat (6)&lt;br /&gt;
    Line ((([cos v] of (i)) * (100)) * ([cos v] of (j))) (([sin v] of (j)) * (100)) (((([sin v] of (i)) * (100)) * ([cos v] of (j))) + (5000)) ((([cos v] of (i)) * (100)) * ([cos v] of ((j) + (30)))) (([sin v] of ((j) + (30))) * (100)) (((([sin v] of (i)) * (100)) * ([cos v] of ((j) + (30)))) + (5000)) :: custom&lt;br /&gt;
    change [j v] by (30)&lt;br /&gt;
  end&lt;br /&gt;
  change [i v] by (30)&lt;br /&gt;
end&lt;br /&gt;
set [j v] to [120]&lt;br /&gt;
repeat (5)&lt;br /&gt;
  set [i v] to [0]&lt;br /&gt;
  repeat (12)&lt;br /&gt;
    Line ((([cos v] of (i)) * (100)) * ([cos v] of (j))) (([sin v] of (j)) * (100)) (((([sin v] of (i)) * (100)) * ([cos v] of (j))) + (5000)) ((([cos v] of ((i) + (30))) * (100)) * ([cos v] of (j))) (([sin v] of (j)) * (100)) (((([sin v] of ((i) + (30))) * (100)) * ([cos v] of (j))) + (5000)) :: custom&lt;br /&gt;
    change [i v] by (30)&lt;br /&gt;
  end&lt;br /&gt;
  change [j v] by (30)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
define Line (X1 :: custom-arg) (Y1 :: custom-arg) (Z1 :: custom-arg) (X2 :: custom-arg) (Y2 :: custom-arg) (Z2 :: custom-arg)&lt;br /&gt;
go to (X1 :: custom-arg) (Y1 :: custom-arg) (Z1 :: custom-arg) :: custom&lt;br /&gt;
pen down&lt;br /&gt;
go to (X2 :: custom-arg) (Y2 :: custom-arg) (Z2 :: custom-arg) :: custom&lt;br /&gt;
pen up&lt;br /&gt;
&lt;br /&gt;
when green flag clicked&lt;br /&gt;
set pen color to [#632d99]&lt;br /&gt;
set pen size to (5)&lt;br /&gt;
forever&lt;br /&gt;
  Loop :: custom&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
define go to (x :: custom-arg) (y :: custom-arg) (z :: custom-arg)&lt;br /&gt;
go to (x :: custom-arg) (y :: custom-arg) (z :: custom-arg) (0) (0) (5000) (mouse y) ((mouse x) / (3)) (0) (0) (0) (0) (240) :: custom&lt;br /&gt;
&amp;lt;/scratchblocks&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
* Method One: [[projects:249646288]]&lt;br /&gt;
* Method Three: [[projects:580400009]]&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
* [[How to Make a Three-Dimensional Project]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Scripting Tutorials]]&lt;/div&gt;</summary>
		<author><name>scratch&gt;Ssvbxx</name></author>
	</entry>
</feed>