首页 > 其他分享 >Derivative norm vector repect to time 《PBM by Pixar》 Appendix D.2 code

Derivative norm vector repect to time 《PBM by Pixar》 Appendix D.2 code

时间:2023-12-20 14:14:23浏览次数:37  
标签:code mathbf cdot frac times D.2 repect dt norm

目录
Vector Calculus

1 Derivative normal vector repect to time

Let's denote the unit normal vector as:

\[\mathbf{n} =\frac{\mathbf{e}_a\times\mathbf{e}_b}{\|\mathbf{e}_a\times\mathbf{e}_b\|} = \frac{1}{\|\mathbf{e}_a\times\mathbf{e}_b\|} \cdot \mathbf{e}_a\times\mathbf{e}_b \]

Where \(\times\) denotesthecrossproduct,and \(\parallel \cdot \parallel\) denotes the norm.

Now, let's find the time derivative \(\frac{d\mathbf{n}}{dt}\).

We'll use the product rule, chain rule, and quotient rule as necessary.

\[\frac{d\mathbf{n}}{dt} = \frac{1}{\|\mathbf{e}_a \times \mathbf{e}_b\|} \cdot \frac{d}{dt}(\mathbf{e}_a \times \mathbf{e}_b) - \frac{(\mathbf{n} \cdot (\mathbf{e}_a \times \mathbf{e}_b)) \cdot \frac{d}{dt}(\mathbf{e}_a \times \mathbf{e}_b)}{\|\mathbf{e}_a \times \mathbf{e}_b\|^2} \]

1.1 Derivative vector norm repect to time

Let's denote \(\mathbf{v}=\mathbf{e}_a\times\mathbf{e}_b\). The norm of v is given by \(\|\mathbf{v}\|=\sqrt{\mathbf{v}\cdot\mathbf{v}}.\)

Now, let's find the derivative of the norm with respect to time \(t\)

\[\frac d{dt}\|\mathbf{v}\|=\frac1{2\sqrt{\mathbf{v}\cdot\mathbf{v}}}\cdot\frac d{dt}(\mathbf{v}\cdot\mathbf{v}) \]

Applying the chain rule and the product rule:

\[\frac d{dt}\|\mathbf{v}\|=\frac1{2\|\mathbf{v}\|}\cdot\frac d{dt}(\mathbf{v}\cdot\mathbf{v}) \]

Now, expand the dot product \(\mathbf{v}\cdot\mathbf{v}:\)

\[\frac{d}{dt}\|\mathbf{v}\|=\frac{1}{2\|\mathbf{v}\|}\cdot\frac{d}{dt}(\mathbf{e}_a\times\mathbf{e}_b\cdot\mathbf{e}_a\times\mathbf{e}_b) \]

Apply the product rule and the chain rule:

\[\frac{d}{dt}\|\mathbf{v}\|=\frac{1}{2\|\mathbf{v}\|}\cdot\left(2(\mathbf{e}_a\times\mathbf{e}_b)\cdot\frac{d}{dt}(\mathbf{e}_a\times\mathbf{e}_b)\right) \]

X Ref

  1. 《Rigid Body Dynamics Lecture Notes》by David Baraff
  2. ChatGPT 3.5

标签:code,mathbf,cdot,frac,times,D.2,repect,dt,norm
From: https://www.cnblogs.com/asmurmur/p/17909669.html

相关文章

  • [LeetCode] LeetCode81. 搜索旋转排序数组II
    题目描述思路:是lc33.搜索旋转排序数组的延伸,允许包含重复元素起初:当nums[left]<=nums[mid]时,区间[left,mid]有序当nums[left]>nums[mid]时,区间[mid,right]有序但是这个题目当nums[left]==nums[mid]时,无法判断哪个区间是有序的,无法判断target位于左侧还是右侧,此时无......
  • [LeetCode Hot 100] LeetCode153. 寻找旋转排序数组中的最小值
    题目描述思路如果数组翻转后又回到升序的情况,即nums[left]<=nums[right],则nums[left]就是最小值,直接返回。如果数组翻转,需要找到数组中第二部分的第一个元素:若nums[left]<=nums[mid],说明区间[left,mid]连续递增,则最小元素一定不在这个区间里,可以直接排除,最小值在[......
  • Odoo_vscode调试
    1.正常开发调试{"name":"Odoo开发调试","type":"python","python":"/home/wdc/work/venv/bin/python3","request":"launch",......
  • Leetcode 044. 通配符匹配
    https://leetcode.cn/problems/wildcard-matching/description/给你一个输入字符串(s)和一个字符模式(p),请你实现一个支持'?'和'*'匹配规则的通配符匹配:'?'可以匹配任何单个字符。'*'可以匹配任意字符序列(包括空字符序列)。判定匹配成功的充要条件是:字符模式必须能够......
  • [Codeforces] CF1795C Tea Tasting
    CF1795CTeaTasting题意有\(n\)个人和\(n\)杯茶,第\(i\)个人每次会喝\(b_i\)毫升的茶。第\(i\)杯茶有\(a_i\)毫升。总共会喝\(n\)轮茶,第\(j\)轮第\(i\)个人会尝试喝第\(i+1-j\)杯茶。喝的量为\(\min(a_{i+1-j},b_i)\)毫升,并且使\(a_{i+1-j}\)减少\(\mi......
  • AtCoder 333 A-D
    AThreeThrees(打表importjava.util.*;classMain{publicstaticvoidmain(String[]args){Scannersc=newScanner(System.in);intn=sc.nextInt();if(n==1)System.out.println(1);if(n==2)System.out.println......
  • vscode调试apollo
    一、插件要求二、通过插件进入容器三、配置默认进入的目录和用户如果不配置默认用户是root,运行不了apollo程序。 修改红框中的默认工作目录和用户名{ "workspaceFolder":"/apollo", "remoteUser":"chenjian", "extensions":[ "BazelBuild.vscode-bazel", &q......
  • vscode中Todo Tree插件的使用
    vscode中TodoTree插件的使用配置JSON将下方的JSON代码放入用户配置中复制JSON配置后,点击这里,然后粘贴。"todo-tree.tree.showScanModeButton":false,"todo-tree.filtering.excludeGlobs":["**/node_modules","*.xml","*.XML"],"todo......
  • vscode插件,将修改的文件同步到服务器
    安装扩展--deploy 在setting.json中进行设置 "deploy":{"targets":[{"type":"sftp","name":"MySFTPfolder","descr......
  • [LeetCode] LeetCode704. 二分查找
    题目描述思路基础二分查找模板的考察。方法一:classSolution{publicintsearch(int[]nums,inttarget){if(nums==null||nums.length==0)return-1;intleft=0,right=nums.length-1;while(left<=right){......