C_R

2135 Reputation

19 Badges

4 years, 246 days

MaplePrimes Activity


These are questions asked by C_R

I am a little overwhelmed by the possibilities of ColorTools.
Is there a graphical overview of implemented palettes side by side?

Currently, the argument is mapped to the HUE coloring scheme (I guess)

plots:-complexplot3d(z, z = -2 - 2*I .. 2 + 2*I, title = -ln(1/c) - ln(c), orientation = [-90, 0, 0])

This makes it difficult to distinguish the sign of the argument close to the positive real axis (just to give an example). To increase contrast I thought about alternatives: Linear ramping from 0 to 2pi from one color to another (similar to phase wrapped images) or a stepped color scheme (in pi/4 increments for example).

I tried color=argument(z/2/Pi) but this did work.

I am looking for something like that but in 3d.

My question is twofold:

- What, in general, are "good" ways to do this? I am surprised that I haven't found anything better than the Boing Ball. Patterns of billard balls might be an alternative if the balls are well oriented at the start of an animation/simulation.

- How can spheres be patterned in Maple? I looked at: plots,obsolete,sphereplot(deprecated), plottools,sphere, and plots,conformal and MaplePrimes for examples but did not find anything to build on. 

Patterns that might not be too complicated to implement:

  • globe with meridians and chessboard pattern,
  • ball with a punched belt,
  • ball with 2 or 3 crossed belts
  • ...

Any thoughts on this topic?

Update: Change of orientation of the angular velocity while the sphere is spinning is an important visualisation aspect. I added this to the title.

I was about to update an older discussion with the information that the context pannel now contains an entry "Normalized Expanded".

I only remember that I was participating with another user.

So, I tried C_R AND other_user in the search field. This gives an error.

A space as an implict AND operator does also not work.

Example: Exanding the left hand side below to the right hand side

Unit('kg'*'m'/'s'^2) = Unit('kg')*Unit('m')/Unit('s')^2;

Such functionality would be useful for manipulating rational functions whose coefficients have units that can otherwise only be simplified by substituting new dimensionless independent variables as dicussed here.

Is there statement that can be mapped over an expression that identifies all subsexpressions with units and expands them to a products of units?

Probably not possible but also desireable: A variant that expands derived physical quantities to a product of base units as for example Newton to base units: Unit('N') = Unit('kg')*Unit('m')/Unit('s')^2;

Unit('N') = Unit('kg')*Unit('m')/Unit('s')^2;

Edit: Example from the link above on Unit expressions with compound units

``

Example that cannot be simplified

H(s) = 60.*Unit('m'*'kg'/('s'^2*'A'))/(.70805*s^2*Unit('kg'^2*'m'^2/('s'^3*'A'^2))+144.*s*Unit('kg'^2*'m'^2/('s'^4*'A'^2))+0.3675e-4*s^3*Unit('kg'^2*'m'^2/('s'^2*'A'^2)))

H(s) = 60.*Units:-Unit(m*kg/(s^2*A))/(.70805*s^2*Units:-Unit(kg^2*m^2/(s^3*A^2))+144.*s*Units:-Unit(kg^2*m^2/(s^4*A^2))+0.3675e-4*s^3*Units:-Unit(kg^2*m^2/(s^2*A^2)))

(1)

simplify(%)

H(s) = 60.*Units:-Unit(m*kg/(s^2*A))/(.70805*s^2*Units:-Unit(kg^2*m^2/(s^3*A^2))+144.*s*Units:-Unit(kg^2*m^2/(s^4*A^2))+0.3675e-4*s^3*Units:-Unit(kg^2*m^2/(s^2*A^2)))

(2)

After expansion of Unit expression (here done by hand) simplifcationis possible with other Maple commands

H(s) = 60.*Unit('m')*Unit('kg')/((.70805*s^2*Unit('kg')^2*Unit('m')^2/(Unit('s')^3*Unit('A')^2)+144.*s*Unit('kg')^2*Unit('m')^2/(Unit('s')^4*Unit('A')^2)+0.3675e-4*s^3*Unit('kg')^2*Unit('m')^2/(Unit('s')^2*Unit('A')^2))*Unit('s')^2*Unit('A'))

H(s) = 60.*Units:-Unit(m)*Units:-Unit(kg)/((.70805*s^2*Units:-Unit(kg)^2*Units:-Unit(m)^2/(Units:-Unit(s)^3*Units:-Unit(A)^2)+144.*s*Units:-Unit(kg)^2*Units:-Unit(m)^2/(Units:-Unit(s)^4*Units:-Unit(A)^2)+0.3675e-4*s^3*Units:-Unit(kg)^2*Units:-Unit(m)^2/(Units:-Unit(s)^2*Units:-Unit(A)^2))*Units:-Unit(s)^2*Units:-Unit(A))

(3)

factor(H(s) = 60.*Units:-Unit(m)*Units:-Unit(kg)/((.70805*s^2*Units:-Unit(kg)^2*Units:-Unit(m)^2/(Units:-Unit(s)^3*Units:-Unit(A)^2)+144.*s*Units:-Unit(kg)^2*Units:-Unit(m)^2/(Units:-Unit(s)^4*Units:-Unit(A)^2)+0.3675e-4*s^3*Units:-Unit(kg)^2*Units:-Unit(m)^2/(Units:-Unit(s)^2*Units:-Unit(A)^2))*Units:-Unit(s)^2*Units:-Unit(A)))

H(s) = 1632653.061*Units:-Unit(s)^2*Units:-Unit(A)/(Units:-Unit(m)*Units:-Unit(kg)*s*(19266.66666*s*Units:-Unit(s)+3918367.346+.9999999999*s^2*Units:-Unit(s)^2))

(4)

normal(H(s) = 60.*Units:-Unit(m)*Units:-Unit(kg)/((.70805*s^2*Units:-Unit(kg)^2*Units:-Unit(m)^2/(Units:-Unit(s)^3*Units:-Unit(A)^2)+144.*s*Units:-Unit(kg)^2*Units:-Unit(m)^2/(Units:-Unit(s)^4*Units:-Unit(A)^2)+0.3675e-4*s^3*Units:-Unit(kg)^2*Units:-Unit(m)^2/(Units:-Unit(s)^2*Units:-Unit(A)^2))*Units:-Unit(s)^2*Units:-Unit(A)))

H(s) = 60.*Units:-Unit(s)^2*Units:-Unit(A)/(Units:-Unit(m)*Units:-Unit(kg)*s*(.70805*s*Units:-Unit(s)+144.+0.3675e-4*s^2*Units:-Unit(s)^2))

(5)

Normalization to a dimensionless equation expression (that still has units) by a scaling factor with units

Sc := Unit('s')^3*Unit('A')/(Unit('m')*Unit('kg'))

Units:-Unit(s)^3*Units:-Unit(A)/(Units:-Unit(m)*Units:-Unit(kg))

(6)

(H(s) = 60.*Units[Unit](s)^2*Units[Unit](A)/(Units[Unit](m)*Units[Unit](kg)*s*(.70805*s*Units[Unit](s)+144.+0.3675e-4*s^2*Units[Unit](s)^2)))*(1/Sc)

Units:-Unit(m)*Units:-Unit(kg)*H(s)/(Units:-Unit(s)^3*Units:-Unit(A)) = 60./(Units:-Unit(s)*s*(.70805*s*Units:-Unit(s)+144.+0.3675e-4*s^2*Units:-Unit(s)^2))

(7)

Rewriting the left hand side

(proc (x) options operator, arrow; x = convert(x, units, m/V) end proc)(Sc)

Units:-Unit(s)^3*Units:-Unit(A)/(Units:-Unit(m)*Units:-Unit(kg)) = Units:-Unit(m/V)

(8)

isolate(Units[Unit](s)^3*Units[Unit](A)/(Units[Unit](m)*Units[Unit](kg)) = Units[Unit](m/V), Unit('m'))

Units:-Unit(m) = Units:-Unit(s)^3*Units:-Unit(A)/(Units:-Unit(m/V)*Units:-Unit(kg))

(9)

subs(Units[Unit](m) = Units[Unit](s)^3*Units[Unit](A)/(Units[Unit](m/V)*Units[Unit](kg)), Units[Unit](m)*Units[Unit](kg)*H(s)/(Units[Unit](s)^3*Units[Unit](A)) = 60./(Units[Unit](s)*s*(.70805*s*Units[Unit](s)+144.+0.3675e-4*s^2*Units[Unit](s)^2)))

H(s)/Units:-Unit(m/V) = 60./(Units:-Unit(s)*s*(.70805*s*Units:-Unit(s)+144.+0.3675e-4*s^2*Units:-Unit(s)^2))

(10)

Magnitude plot

abs(H(s)/Units[Unit](m/V) = 60./(Units[Unit](s)*s*(.70805*s*Units[Unit](s)+144.+0.3675e-4*s^2*Units[Unit](s)^2)))

abs(H(s))/Units:-Unit(m/V) = 60./(Units:-Unit(s)*abs(s*(.70805*s*Units:-Unit(s)+144.+0.3675e-4*s^2*Units:-Unit(s)^2)))

(11)

H(s) = H(f), s = I*omega, omega = 2*Pi*f

H(s) = H(f), s = I*omega, omega = 2*Pi*f

(12)

subs(H(s) = H(f), s = I*omega, omega = 2*Pi*f, abs(H(s))/Units[Unit](m/V) = 60./(Units[Unit](s)*abs(s*(.70805*s*Units[Unit](s)+144.+0.3675e-4*s^2*Units[Unit](s)^2))))

abs(H(f))/Units:-Unit(m/V) = 60./(Units:-Unit(s)*abs((2*I)*Pi*f*((4.448809357*I)*f*Units:-Unit(s)+144.-0.14700e-3*Pi^2*f^2*Units:-Unit(s)^2)))

(13)

plot(rhs(abs(H(f))/Units[Unit](m/V) = 60./(Units[Unit](s)*abs((2*I)*Pi*f*((4.448809357*I)*f*Units[Unit](s)+144.-0.14700e-3*Pi^2*f^2*Units[Unit](s)^2)))), f = 0*Unit('Hz') .. 10*Unit('Hz'), labels = [f/Unit('Hz'), lhs(abs(H(f))/Units[Unit](m/V) = 60./(Units[Unit](s)*abs((2*I)*Pi*f*((4.448809357*I)*f*Units[Unit](s)+144.-0.14700e-3*Pi^2*f^2*Units[Unit](s)^2))))])

 

 


Download Expansion_of_Unit_command_and_simplification_to_m_per_V.mw

3 4 5 6 7 8 9 Last Page 5 of 27