Simplified 3D programming method and platform for department and wound education
By running a JavaScript-based 3D programming environment in the browser, simulating Python programming syntax, the problem of high complexity of existing 3D programming tools is solved, and children and beginners are quickly introduced to 3D programming, which improves learning interest and interactivity.
Patent Information
- Application Number
- CN202411569465.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-05
- Publication Date
- 2025-03-25
Smart Images

Figure CN119690391A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence, and more specifically, to a simplified 3D programming method and platform for science and technology education. Background Art
[0002] In modern education, programming has become an important tool for cultivating children and beginners' logical thinking, creativity and problem-solving skills. 3D programming can effectively attract learners' interest due to its visual intuitiveness and strong interactivity, making abstract programming concepts easier to understand. 3D scene construction can help learners better understand programming basics, spatial thinking and logical structure.
[0003] However, current 3D programming tools are usually complex, require deep programming and mathematical knowledge, are difficult to use, and lack interactivity and fun. In addition, most tools require specific hardware or software environment support, which limits their application in general educational scenarios. They are not suitable for beginners, especially children. At the same time, many existing tools also require high-performance hardware and complex development environments, further increasing the threshold for use.
[0004] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0005] The embodiments of the present application provide a simplified 3D programming method and platform for science and technology education, so as to at least solve the technical problem that programming is complex and difficult for children and beginners to quickly get started.
[0006] According to one aspect of an embodiment of the present application, a simplified 3D programming method for science and technology education is provided, comprising: running a 3D programming environment developed based on JavaScript through a browser, wherein the 3D programming environment can simulate Python programming syntax and receive Python code input by a user; and performing 3D programming based on the Python code input by the user.
[0007] According to another aspect of an embodiment of the present application, a simplified 3D programming platform for science and technology education is also provided, including: a browser for running a 3D programming environment developed based on JavaScript, wherein the 3D programming environment can simulate Python programming syntax and receive Python code input by a user; a 3D programming module for performing 3D programming based on the Python code input by the user.
[0008] In the embodiment of the present application, a 3D programming environment developed based on JavaScript is run through a browser, wherein the 3D programming environment can simulate Python programming syntax, receive Python code input by a user, and perform 3D programming based on the Python code input by the user. The above solution solves the problem that programming is complex and difficult for children and beginners to quickly get started. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0010] Figure 1 is a flow chart of a simplified 3D programming method for science and technology education according to an embodiment of the present application;
[0011] Figure 2 is an architecture diagram of a simplified 3D programming platform for science and technology education according to an embodiment of the present application;
[0012] Figure 3 This is a diagram of a Python code input interface of a 3D programming platform according to an embodiment of the present application;
[0013] Figure 4 This is a diagram of a building block code input interface of a 3D programming platform according to an embodiment of the present application;
[0014] Figure 5 It is an animation effect display diagram generated based on input Python code according to an embodiment of the present application;
[0015] Figure 6 is a flowchart of another simplified 3D programming method for science and technology education according to an embodiment of the present application;
[0016] Figure 7 It is a structural schematic diagram of a simplified 3D programming device for scientific and technological innovation education according to an embodiment of the present application;
[0017] Figure 8 A schematic diagram of the structure of an electronic device suitable for implementing the embodiments of the present disclosure is shown. DETAILED DESCRIPTION
[0018] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0019] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0020] According to an embodiment of the present application, a method embodiment of a simplified 3D programming method for science and technology education is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0021] Existing 3D programming environments and scene building tools have significant limitations, which are mainly reflected in the following aspects: First, the design of these tools is relatively complex, resulting in a steep learning curve, especially for children and beginners, requiring a high level of programming and mathematics foundation, and it is difficult to get started quickly; second, the operation is cumbersome, and often requires a lot of code to achieve simple 3D operations, which can easily frustrate beginners; in addition, these tools lack special designs for children and beginners, lack guiding and interesting functions, and are not conducive to stimulating learning interest; at the same time, the environment configuration requirements are high, usually requiring complex development environment settings and high-performance hardware support, which is inconvenient to use on ordinary devices or browsers; finally, its scalability and flexibility are insufficient, and it cannot flexibly adapt to different educational needs, and lacks customization and expansion capabilities.
[0022] Figure 1 It is a simplified 3D programming method for science and technology education according to an embodiment of the present application, such as Figure 1 As shown, the method comprises the following steps:
[0023] Step S102: running a 3D programming environment developed based on JavaScript through a browser, wherein the 3D programming environment can simulate Python programming syntax and receive Python code input by a user.
[0024] Step S104, performing 3D programming based on the Python code input by the user.
[0025] Based on the Python code input by the user, at least one 3D object is generated through a 3D object creation module; the generated at least one 3D object is added to a 3D scene and managed through a scene management module; according to device performance, WebGL or Canvas is selected through a rendering module to perform real-time rendering on the at least one 3D object.
[0026] In some embodiments, a user interaction instruction may be received, the interaction instruction may be responded to by an event processing module, and the property of the at least one 3D object may be modified according to the interaction instruction, wherein the user interaction instruction may include a mouse click or a keyboard input.
[0027] In some embodiments, based on a user sound effect instruction, a sound effect management module may be used to add sound effects or background music to the 3D scene.
[0028] In some embodiments, at least one of the following may also be performed through the auxiliary tool module: code template generation, scene saving and loading, error detection and prompting.
[0029] In some embodiments, animation effects can also be added to the at least one 3D object based on the Python code input by the user, and the timing of the animation can be controlled through the timeline management module; wherein the animation effect includes at least one of the movement, rotation, and scaling operations of the object; and the triggering conditions and execution order of the animation can be controlled based on the Python code input by the user.
[0030] In this application, users can easily run the program through a browser without additional environment configuration, which lowers the usage threshold; the simulated Python programming environment and simplified API design enable children and beginners to get started quickly, eliminating the barriers of complex programming and mathematical knowledge; through intelligent rendering adaptation and modular design, users can easily build and adjust 3D scenes, improving intuitiveness and participation; in addition, the system provided by this application has high compatibility, supports cross-platform operation, and enhances the fun and interactivity of learning through rich interactive event processing and sound management functions, comprehensively improving the efficiency and experience of programming learning.
[0031] The present application provides a 3D programming platform, which is a simplified 3D programming environment for children and beginners, such as Figure 2 As shown in the figure, the 3D programming platform mainly includes: core architecture module, rendering module, 3D object creation module, scene management module, event processing module, sound management module, and auxiliary tool module. These modules work together to form a convenient platform for users to perform 3D programming through a browser without installing additional software or hardware configuration. Figure 3 As shown, users can perform 3D programming in the code input area, or Figure 4 As shown, 3D programming is performed by dragging blocks. After programming is completed, click the run control to present the 3D programming effect. The code of this application is to indicate the dynamic generation of a hexagonal complex, such as Figure 5 As shown, the resulting hexagonal complex is composed of six regular hexagons arranged with one vertex as the common center point. One vertex of each hexagon coincides with the center point, forming a symmetrical and uniform pattern.
[0032] The core framework module is used in a JavaScript-based development environment, simulating Python programming syntax and functions. Users can write code using Python-style syntax through a browser. The core framework module lowers the programming threshold for children and beginners, allowing users to write code in familiar Python syntax and improve their programming experience.
[0033] The main functions of the core architecture module include: 1) Code parsing and execution: This module can parse the Python-style code written by the user and convert it into JavaScript code adapted to the Web environment, so that it can be executed in real time in the browser. 2) Browser compatibility: Through the high compatibility of JavaScript and Web browsers, users can run 3D programming codes in any standard browser without installing additional software, which is suitable for multiple platforms such as desktop devices and mobile devices. 3) Modular interface: The core architecture provides a simplified API interface to help users call various 3D object, rendering, event processing and other functional modules, making programming more intuitive and convenient.
[0034] The rendering module is used to render the 3D objects and scenes created by the user in real time through WebGL or Canvas technology. The system intelligently selects the best rendering method based on the performance of the user's device to ensure smooth operation under different hardware conditions. For devices that support WebGL, the system will automatically use this technology for high-performance graphics rendering, providing realistic 3D effects, suitable for processing complex scenes and animations. For devices that do not support WebGL, the system will switch to Canvas for rendering. Although the effect is relatively basic, it can ensure that the 3D scene can still be displayed smoothly on low-performance devices. The rendering module supports real-time updates of the scene and can instantly adjust the viewing angle based on user interactions (such as rotation and scaling) to ensure that users can have a smooth programming experience.
[0035] The 3D object creation module provides a simplified API interface to facilitate users to create and manage common 3D objects, such as cubes, spheres, cylinders, etc. Users can set various properties of 3D objects, including position, rotation angle, scaling, etc., through function calls.
[0036] The main functions of the 3D object creation module include: 1) Object initialization: It provides common 3D geometric body creation methods. Users can quickly generate objects by specifying parameters (such as size, position, etc.). 2) Property setting: Users can set the properties of objects through the API interface, such as position, rotation angle, scale, material, etc. Each property of the object can be dynamically adjusted in a parameterized way, which is convenient for users to flexibly design scenes.
[0037] The scene management module is the basis for users to design 3D worlds. Through this module, users can organize and manage multiple 3D objects and group them to help build more complex 3D environments.
[0038] The main functions of the scene management module include: 1) Scene creation and management: Users can create multiple independent 3D scenes through the API and manage the objects in each scene, allowing the relationship between objects to be more intuitive. 2) Object hierarchy: Users can group 3D objects and logically bind multiple objects to facilitate scene management and rendering. This hierarchical design allows users to be more flexible when controlling objects. 3) View setting: The scene management module also allows users to adjust the view position and angle, making it easier for users to observe changes in 3D scenes from different viewpoints and enhance visual effects. 4) Object management: Allows users to manage created 3D objects, including operations such as adding, deleting, and cloning objects. Users can easily build complex 3D scenes.
[0039] The event processing module is used to provide interactive functions for users. Users can define various interactive events (such as mouse clicks, keyboard inputs, etc.) and bind them to 3D objects to achieve interactive control in the scene.
[0040] The main functions of the event processing module include: 1) Custom event binding: Users can set various trigger conditions (such as click, hover, etc.) for 3D objects, and execute the corresponding code when the event occurs. The interactive design of the embodiment of the present application enhances the fun of programming, and is especially suitable for children to learn interactive programming. 2) Event feedback: When a user triggers an event, the system can provide real-time feedback on the results of the operation. For example, clicking on a cube changes its color or size, further enhancing the user's sense of immersion. 3) Real-time monitoring and response: Monitor user operations and respond quickly to ensure that the system can provide feedback with minimal delay when the user interacts.
[0041] The sound effect management module provides sound effect control functions for scenes. Users can add background music or sound effects to 3D scenes to add an immersive experience to programming works. Users can add background music or specific sound effects to scenes through the API interface, and control the play, pause or volume of sound effects through simple parameter settings. Sound effects can be bound to specific 3D objects. For example, when a user clicks on an object, a specific sound effect is played to further enhance the interactive effect. At the same time, sound effects can also be adjusted in real time. Users can dynamically modify the properties of sound effects (such as volume, playback speed, etc.) as needed.
[0042] The auxiliary tool module provides users with convenient programming auxiliary functions, including code template generation, scene saving and loading, error detection and prompts, etc., to help users quickly get started and solve common problems in the programming process. Specifically, it provides common code templates for beginners to help users quickly create common 3D scenes and objects. In addition, users can save the current scene design at any time and load the scene for further editing in the future. This provides users with a convenient way to continuously modify and improve their programming works. Finally, the module also has a built-in code error detection function, which can monitor the user's code in real time and provide error prompts, helping users to find and solve problems faster.
[0043] This application first reduces the difficulty of programming through a simplified API interface design, allowing children and beginners to quickly get started with 3D scene construction. Secondly, based on JavaScript simulating the Python environment, users can program smoothly in the browser without installing additional software, which improves ease of use. The modular architecture design facilitates maintenance and expansion, and users can flexibly combine functional modules. By combining WebGL and Canvas technology, real-time rendering and interactive control are achieved, enhancing the user's sense of immersion. In addition, the present invention supports a wealth of event processing and sound management functions, which enhances the fun of the learning process. Finally, based on the cross-platform compatibility of JavaScript and WebGL, the platform can run on a variety of devices and environments, greatly improving practicality and promotion.
[0044] The following will describe in detail the operation of the simplified 3D programming platform for science and technology education. Figure 6 As shown, the present application also provides another simplified 3D programming method for science and technology education, which is applied to the simplified 3D programming platform for science and technology education. The method comprises the following steps:
[0045] Step S602, initializing the environment.
[0046] When a user accesses the platform through a browser, the system first initializes the programming environment through the core architecture module. The system automatically loads the core architecture and necessary rendering engines, and the user can enter the programming interface without any additional configuration. At this point, the user can write Python-style code in the code editor provided by the platform, and all operations will be completed in real time in the browser.
[0047] Step S604: creating a 3D object.
[0048] Users write code and call simplified API interfaces through the 3D object creation module to create 3D geometric bodies. Users can specify the type of geometric body (such as cube, sphere, cylinder, etc.) and its properties (such as position, rotation angle, scale, etc.) as needed. For example, when a user wants to create a cube, the system will automatically generate the object through API calls and display it in the scene.
[0049] The following example shows how to use this simplified 3D programming environment to create a basic 3D cube and add it to the scene.
[0050] #Import library package
[0051] import wood3d
[0052] #Create a renderer
[0053] renderer=wood3d.WebGLRenderer()
[0054] #Create a scene
[0055] scene = wood3d.Scene()
[0056] #Create a camera
[0057] camera = wood3d.Camera()
[0058] #Set the camera's Z axis position
[0059] camera.position.set(0,0,5)
[0060] #Create a cube with length, width and height equal to 1
[0061] box = wood3d.Box(1,1,1)
[0062] #Add the cube to the scene
[0063] scene.add(box)
[0064] #Rendering
[0065] renderer.render(scene,camera)
[0066] #Start the controller
[0067] controls=wood3d.OrbitControls()
[0068] controls.autoRotate = True
[0069] def update():
[0070] controls.update()
[0071] renderer.render(scene,camera)
[0072] #Keep running
[0073] wood3d.go()
[0074] Step S606: scene management.
[0075] After users create 3D objects, they can add them to the 3D scene through the scene management module. Users manage the scene through code, such as adding new objects, deleting existing objects, adjusting the object hierarchy, etc. The system will update the scene in real time according to the user's operation to ensure that the user's design can be presented instantly.
[0076] Step S608, event binding and interaction.
[0077] After designing the scene, users can bind interactive events to objects through the event processing module. Users can define various trigger events, such as click, hover, keyboard input, etc., and write corresponding callback functions. When users trigger these events in the running environment, the system will execute the user-defined logic in real time to achieve the interactive effect in the scene.
[0078] The following example shows how to interact with a 3D object through mouse click events, making the object change color when clicked.
[0079] #Import library package
[0080] from wood3d import*
[0081] #Create a renderer
[0082] renderer = WebGLRenderer()
[0083] #Create a scene
[0084] scene = Scene()
[0085] #Create a camera
[0086] camera=Camera()
[0087] #Set the camera's Z axis position
[0088] camera.position.set(0,0,5)
[0089] #Create a cube with length, width and height equal to 1
[0090] box=Box(1,1,1)
[0091] #Add the cube to the scene
[0092] scene.add(box)
[0093] #Define click event processing function
[0094] def on_click(event):
[0095] box.material.color = Color ('red') #Turns red after clicking #Bind click event
[0096] box.click(on_click)
[0097] #Rendering
[0098] renderer.render(scene,camera)
[0099] #Start the controller
[0100] controls = OrbitControls()
[0101] def update():
[0102] controls.update()
[0103] renderer.render(scene,camera)
[0104] #Keep running
[0105] go()
[0106] Step S610: sound effect control.
[0107] After the user creates a scene and binds events, the sound effect management module allows the user to add sound effects to the scene or specific 3D objects. Users can set background music or specific sound effects through simplified API calls. For example, users can set a click sound effect for a button object, or add background music to the scene to enhance the immersion of the programming project. Users can also dynamically adjust the properties of the sound effect, such as volume, playback rate, sound effect loop, etc.
[0108] In some embodiments, the user can set background sound effects for the entire scene, and the sound effect management module will automatically load the specified audio file and control its playback. The user can specify the playback start time, volume and loop mode of the background sound effect through code.
[0109] In some embodiments, users can set sound effect trigger events for specific 3D objects. For example, when a certain object is clicked, a specific sound effect is played, or when the mouse hovers over the object, different sound effect feedback is triggered. Through this interactive design, users can further enhance the fun and interactivity of the 3D scene.
[0110] In some embodiments, during the running of a scene, the user can dynamically control the sound effects as needed, such as adjusting the volume, pausing or resuming playback, etc., making the user's control over the sound effects more flexible and able to make real-time adjustments based on scene changes.
[0111] The following example shows how to add background music to a scene and make a 3D object rotate automatically.
[0112] #Import library package
[0113] from wood3d import*
[0114] #Create a renderer
[0115] renderer = WebGLRenderer()
[0116] #Create a scene
[0117] scene = Scene()
[0118] #Create a camera
[0119] camera=Camera()
[0120] #Set the camera's Z axis position
[0121] camera.position.set(0,0,5)
[0122] #Create a sphere object
[0123] sphere=Sphere(1,32,16)
[0124] scene.add(sphere)
[0125] #Add background music
[0126] path = 'background.mp3'# Sound effect address
[0127] music.play(path)
[0128] #Rendering
[0129] renderer.render(scene,camera)
[0130] #Start the controller
[0131] controls = OrbitControls()
[0132] def update():
[0133] controls.update()
[0134] renderer.render(scene,camera)
[0135] #Keep running
[0136] go()
[0137] The above examples demonstrate how to quickly create 3D objects, implement interactions, and add sound effects through a simplified API. This shows that the present invention has great advantages in lowering the learning threshold and improving user experience.
[0138] Step S612: rendering and display.
[0139] Finally, the rendering module is responsible for rendering all 3D objects in the scene and user interactions in real time. Users can view the effects of the written 3D code in real time through the browser. The system will automatically select the most appropriate rendering method based on the user's device performance, ensuring high-quality rendering in WebGL on high-performance devices and basic rendering in Canvas on low-performance devices to ensure compatibility.
[0140] In some embodiments, after the user completes all object creation, event binding and sound effect settings, the rendering module is responsible for rendering and displaying all the contents of the scene. Through the efficient rendering of WebGL, the user can see realistic 3D effects, including visual details such as light and shadow, and materials.
[0141] In some embodiments, all interactive operations of the user with the 3D objects in the browser (such as clicking, rotating, zooming, etc.) will receive instant feedback through the linkage of the event processing module and the rendering module. The 3D objects in the scene will automatically adjust the display status according to the user's operations to ensure smooth interaction.
[0142] In some embodiments, the rendering module can dynamically update the scene. When the user is writing or modifying the code, the system can instantly adjust the display and property changes of the 3D object, ensuring that the user can view the modified effect in real time. This real-time rendering function provides users with a more intuitive programming experience, especially suitable for beginners to perform real-time debugging and learning.
[0143] In some embodiments, the specific rendering method may be: first, select an initial rendering data, and generate multiple sets of rendering data instances through instantiation operation. Each set of instantiated rendering data is assigned independent spatial positioning information and cropping identifier (ID). The instantiated data is spatially laid out through the positioning information and the cropping ID, so as to achieve accurate arrangement of multiple rendering data in three-dimensional space. Next, an independent rendering ID is generated according to the physical position of the display screen and its display parameters. Based on the rendering ID and the cropping ID corresponding to each set of rendering data, the system performs a vertex cropping operation, retains part of the data matching the 3D display device during the cropping process, removes redundant data, and obtains the rendering data after vertex cropping. Subsequently, the rendering scene is set by constructing an orthogonal camera, and the cropping ratio parameters are configured for the camera, including the association setting of the camera's aspect ratio and the screen resolution. The field of view of the camera is dynamically adjusted to ensure real-time rendering on the screen, and is updated in real time according to the cropped rendering data to ensure that the rendering result is highly consistent with the physical display parameters of the device. In order to enhance the flexibility of the system, it can also be optimized based on the vertex offset matrix. When constructing the vertex offset matrix, the vertex coordinates of each group of rendering data are dynamically adjusted with reference to the offset of the preset near clipping plane and the model, so as to ensure the accuracy and consistency of the rendering data in the display. In addition, by gradually calculating the two-dimensional interval distance (including horizontal and vertical intervals) between the rendering data, the consistent display effect of the data on different display devices is ensured. This application introduces a matching mechanism between independent rendering IDs and clipping IDs, combined with fine vertex clipping operations and real-time rendering adjustments of orthogonal cameras, so that the rendering accuracy and real-time performance have been significantly improved. Compared with traditional rendering methods, this application can better adapt to the dynamic changes of the display screen, and through automated clipping and rendering configuration, it reduces human intervention and improves the stability and efficiency of the system.
[0144] Through the simplified 3D programming platform of this application, users can seamlessly experience 3D programming in a standard browser environment. The platform is particularly suitable for children and programming beginners, providing an intuitive and easy-to-use interface and rich functional modules, allowing users to easily build and display 3D scenes. Users do not need to master complex programming knowledge, just use a simplified API interface to create rich 3D objects, set sound effects, add interactions, and instantly view the results through the rendering module. The platform has a wide range of application prospects in teaching, and can effectively help children and beginners quickly master the basic concepts of 3D programming, and improve learning efficiency through real-time feedback. Through simplified programming processes and modular design, this application not only lowers the threshold for programming, but also provides users with a platform for freely creating 3D works, helping them to cultivate creativity and logical thinking skills in the programming process. In addition, the platform of this application is also highly compatible, and users can use it on different devices and operating systems without additional installation and configuration, which minimizes the technical threshold. The introduction of sound effects and interactive functions not only enriches the programming content, but also enhances the user's sense of immersion and participation, which helps to enhance the user's interest in learning.
[0145] In summary, the simplified 3D programming platform proposed in this application innovatively combines Python syntax simulation, Web browser compatibility, real-time rendering and interaction technologies, solving the problems of complex and high threshold of existing 3D programming environment.
[0146] The present application also provides a simplified 3D programming device for science and technology education, such as Figure 7 As shown, it includes: a code input module 72, which is used to run a 3D programming environment developed based on JavaScript, wherein the 3D programming environment can simulate Python programming syntax and receive Python code input by a user; a 3D programming module 74, which is used to perform 3D programming based on the Python code input by the user.
[0147] It should be noted that the simplified 3D programming device for science and technology education provided in the above embodiment is only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the simplified 3D programming device for science and technology education provided in the above embodiment and the simplified 3D programming method embodiment for science and technology education belong to the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.
[0148] Figure 8 FIG. 1 shows a schematic diagram of the structure of an electronic device suitable for implementing the embodiment of the present disclosure. It should be noted that: Figure 8The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0149] like Figure 8 As shown, the electronic device includes a central processing unit (CPU) 1001, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage part 1008 into a random access memory (RAM) 1003. In the RAM 1003, various programs and data required for system operation are also stored. The CPU 1001, the ROM 1002, and the RAM 1003 are connected to each other via a bus 1004. An input / output (I / O) interface 1005 is also connected to the bus 1004.
[0150] The following components are connected to the I / O interface 1005: an input section 1006 including a keyboard, a mouse, etc.; an output section 1007 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 1008 including a hard disk, etc.; and a communication section 1009 including a network interface card such as a LAN card, a modem, etc. The communication section 1009 performs communication processing via a network such as the Internet. A drive 1010 is also connected to the I / O interface 1005 as needed. A removable medium 1011, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1010 as needed, so that a computer program read therefrom is installed into the storage section 1008 as needed.
[0151] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A simplified 3D programming method for science and technology education, characterized in that: include: Running a 3D programming environment developed based on JavaScript through a browser, wherein the 3D programming environment can simulate Python programming syntax and receive Python code input by a user; 3D programming is performed based on the Python code input by the user.
2. The method according to claim 1, characterized in that Based on the Python code input by the user, 3D programming is performed, including: Based on the Python code input by the user, generating at least one 3D object through a 3D object creation module; Adding the generated at least one 3D object to the 3D scene through a scene management module and managing it; According to the device performance, WebGL or Canvas is selected through the rendering module to perform real-time rendering on the at least one 3D object.
3. The method according to claim 2, characterized in that After selecting WebGL or Canvas to perform real-time rendering of the at least one 3D object through the rendering module, the method further includes: receiving a user's interaction instruction, responding to the interaction instruction through an event processing module, and modifying the properties of the at least one 3D object according to the interaction instruction, wherein the user's interaction instruction includes a mouse click or a keyboard input.
4. The method according to claim 2, characterized in that: After selecting WebGL or Canvas to perform real-time rendering on the at least one 3D object through the rendering module, the method further includes: adding sound effects or background music to the 3D scene through the sound effect management module based on a user sound effect instruction.
5. The method according to claim 2, characterized in that: After selecting WebGL or Canvas to perform real-time rendering on the at least one 3D object through the rendering module, the method further includes: performing at least one of the following through the auxiliary tool module: code template generation, scene saving and loading, error detection and prompting.
6. The method according to claim 2, characterized in that After generating at least one 3D object by the 3D object creation module, the method further includes: Based on the Python code input by the user, an animation effect is added to the at least one 3D object, and the animation is controlled in timing by a timeline management module; wherein the animation effect includes at least one of the operations of moving, rotating, and scaling the object; Based on the Python code input by the user, the triggering conditions and execution order of the animation are controlled.
7. A simplified 3D programming device for scientific and technological education, characterized in that: include: A code input module, used to run a 3D programming environment developed based on JavaScript, wherein the 3D programming environment can simulate Python programming syntax and receive Python code input by a user; The 3D programming module is used to perform 3D programming based on the Python code input by the user.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute the method according to any one of claims 1 to 6.
9. A computer device, characterized in that: include: Memory and processor, The memory stores a computer program; The processor is used to execute the computer program stored in the memory, and when the computer program is run, the processor is enabled to execute the method according to any one of claims 1 to 6.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Cited By
Online code compilation
US20250315232A1