Forums Anyscript.org  

Go Back   Forums Anyscript.org > Professional Forum > AnyBody Managed Model Repository

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 11-07-2017, 12:50 PM
hujiayu1315 hujiayu1315 is offline
Junior Member
 
Join Date: Jun 2014
Posts: 8
Default AnyFunPolynomial

hello

How to use the AnyFunPolynomial to define a square root function such as Joint angle = t^0.5 to become a DriverFun ?

Many thanks
Reply With Quote
  #2  
Old 11-08-2017, 10:38 AM
toerholm's Avatar
toerholm toerholm is offline
AnyBody Support
 
Join Date: Feb 2009
Posts: 865
Default

Hi

It is not possible using an AnyFunPolynomial to make a square root function.

The best way to make such a function would be to use an AnyFunInterpol function.

Something like this :

Code:
AnyKinEqInterPolDriver myfunc ={
  Type=Bspline;
  AnyInt NumberOfElements =5000;
  T=linspace(-10,10,NumberOfElements);
  Data ={sqrt(T)};   
  AnyKinMeasureOrg &ref=.YourJoint;
};
__________________
TIP: How to save and load results.
http://wiki.anyscript.org/index.php/All_about_AnyBody_Modeling_System#Save_Load_and_Re play_Results

Subscribe to the forums, click the 'Forum Tools' link above the list of threads then select 'Subscribe to Forum'. You will then have the option to choose the subscription mode for this forum and get an email automatically.
Reply With Quote
  #3  
Old 11-08-2017, 01:16 PM
msan00 msan00 is offline
Member
 
Join Date: Apr 2009
Posts: 58
Default

Hi

Just a quick comment. I think that if you change your equation to (Joint angle)^2 = t, you can implement this using the AnyKinMeasureFunComb1 class to square the joint angle.

Best regards
Michael
__________________
Michael Skipper Andersen, Ph.D.
Associate Professor
The AnyBody Research Group
Aalborg University

Last edited by msan00; 11-08-2017 at 01:19 PM.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 06:20 AM.