Supercharge Your Innovation With Domain-Expert AI Agents!

Method and device for realizing rope hanging effect based on box2d

A sub-rope and main-rope technology, applied in the computer field, can solve the problems of rigid fixation and inability to shake the rope, and achieve the effect of improving authenticity

Pending Publication Date: 2022-04-26
宝宝巴士股份有限公司
View PDF0 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] Using animation to control Bezier curve control points is relatively rigid and fixed, and cannot shake like a real-world rope

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method and device for realizing rope hanging effect based on box2d
  • Method and device for realizing rope hanging effect based on box2d

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0029] Please refer to figure 1 , a box2d-based method for realizing the lanyard effect, including steps:

[0030] S1. Create the main rope control point rigid body and the sub-rope control point rigid body respectively through box2d;

[0031] Step S1 is specifically:

[0032] The main rope rigid body and the sub-rope rigid body are respectively created by box2d as the control points of the Bezier curve, and the corresponding main rope control point rigid body and sub-rope control point rigid body are obtained.

[0033] S2. Draw the main rope according to the rigid body of the main rope control points, and obtain corresponding points through bisection calculation;

[0034] Step S2 is specifically:

[0035] The main rope is drawn according to the rigid body of the main rope control point, and according to the implicit equation of the Bezier curve, the ordinate of the starting point of the sub-rope is obtained through bisection calculation.

[0036] S3. Use the calculated po...

Embodiment 2

[0039] Please refer to figure 2 , a device 1 based on box2d for realizing the lanyard effect, comprising a memory 2, a processor 3 and a computer program stored on the memory 2 and operable on the processor 3, when the processor 3 executes the program, it realizes Each step in the first embodiment.

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention provides a method and a device for realizing a rope hanging effect based on box2d. The method comprises the following steps: respectively creating a main rope control point rigid body and a sub-rope control point rigid body through the box2d; a main rope is drawn according to the main rope control point rigid body, and corresponding points are calculated through a dichotomy method; a point obtained through calculation is used as a sub-rope starting point to draw a sub-rope, the rope hanging effect is achieved, a box2d rigid body is used as a control point of a Bezier curve, rope shaking like the real world can be achieved, the Bezier curve line drawing with texture is directly adopted to replace the mode that the rope is segmented and rendered one by one, gaps can be avoided, and therefore the rendering authenticity is improved.

Description

technical field [0001] The invention relates to the field of computer technology, in particular to a box2d-based method and device for realizing the hanging rope effect. Background technique [0002] At present, there are two common ways to achieve the effect of the rope. The first is to control the control points on the Bezier curve through animation, and refresh and draw the Bezier curve in real time to realize the rope shaking. The second is to decompose the rope into multiple segments, create a rigid body based on box2d for each segment, set a picture sprite on the rigid body, and use rope joints to connect the rigid body and rigid body. [0003] Using animation to control the control points of the Bezier curve is relatively rigid and fixed, and cannot shake like a real-world rope. [0004] Using the method of decomposing the rope into multiple rigid bodies, no matter how short the rope joint between the rigid body and the rigid body is, there will be gaps, resulting in...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06T11/20G06T13/80
CPCG06T13/80G06T11/203
Inventor 黄新伟吴琳琳何敏唐光宇闫乃永卢学明
Owner 宝宝巴士股份有限公司
Features
  • R&D
  • Intellectual Property
  • Life Sciences
  • Materials
  • Tech Scout
Why Patsnap Eureka
  • Unparalleled Data Quality
  • Higher Quality Content
  • 60% Fewer Hallucinations
Social media
Patsnap Eureka Blog
Learn More