text:
## Posts Tagged ‘rendering’

### Paper-worthy rendering in MATLAB

Thursday, July 20th, 2017

MATLAB is not a great tool for creating 3D renderings. However, the learning curves for most commercial rendering tools are quite steep. Other tools like Mitsuba can create beautiful pictures, but can feel quite cumbersome for rendering pure geometry rather than the physical scenes their designed for.

Over the years, I’ve developed a way of creating plots of 3D shapes in MATLAB using a few extra functions in gptoolbox. This started as a way to just make images from research prototypes more palatable, but eventually became the usual way that I render images for papers. If the code for my research is already written in MATLAB then one huge advantage is that every image in my paper can have a *.m script that deterministically generates the result and the corresponding image with user intervention. This helps with reproducibility, editing and sharing between collaborators.

Here’s a “VFX Breakdown” of rendering a 3D shape in MATLAB.

t = tsurf(F,V);
set(gcf,'COlor',0.94*[1 1 1]);
teal = [144 216 196]/255;
pink = [254 194 194]/255;
bg_color = pink;
fg_color = teal;
for pass = 1:10
switch pass
case 1
% blank run
axis([-209.4       119.38      -181.24       262.67      -247.28 247.38]);
case 2
axis equal;
axis([-209.4       119.38      -181.24       262.67      -247.28 247.38]);
axis vis3d;
case 3
t.EdgeColor = 'none';
case 4
set(t,fphong,'FaceVertexCData',repmat(fg_color,size(V,1),1));
case 5
set(t,fsoft);
case 6
l = light('Position',[0.2 -0.2 1]);
case 7
set(gca,'Visible','off');
case 8
set(gcf,'Color',bg_color);
case 9
case 10
end

vidObj = VideoWriter(sprintf('nefertiti-%02d.mp4',pass),'MPEG-4');
vidObj.Quality = 100;
vidObj.open;
thetas = linspace(30,-30,450);
for theta = thetas(1:end-1)
view(theta,30);
drawnow;
vidObj.writeVideo(getframe(gcf));
end
vidObj.close;

end

Wednesday, September 9th, 2015

Here’s a little script demonstrating some of the fancy 3d-model rendering features you can squeeze out of MATLAB with a little effort. Stroking sharp edges and silhouettes and giving just the hint of transparency, you can achieve a CAD-style effect.

[V,F] = load_mesh('~/Dropbox/models/fandisk.off');
V = V*axisangle2matrix([1 0 0],pi);
N = normals(V,F);
BC = barycenter(V,F);

% sharp edges
A(1&A) = abs(A(1&A)-pi)>pi*0.11;
[CI,~,CV] = find(C.*A);
E = F([CI+mod(CV,3)*size(F,1) CI+mod(CV+1,3)*size(F,1)]);

% cut mesh at sharp edges to get crisp normals
[G,I] = cut_edges(F,E);
W = V(I,:);

% floor board
BB = bounding_box(V(:,1:2));
BB = bsxfun(@plus,bsxfun(@minus,BB,mean(BB))*2,mean(BB));
BB(:,3) = min(V(:,3))-4e-3;
BB = reshape(permute(BB,[1 3 2]),[2 2 3]);
% checkboard texture
ch = repmat(1-0.2*xor((mod(repmat(0:128-1,128,1),8*2)>7), ...
(mod(repmat((0:128-1)',1,128),8*2)>7)),[1 1 3])*0.5 + 0.5;

clf;
hold on;
blue = [0.2 0.3 0.8];
tf = tsurf(G,W, ...
'FaceVertexCData',repmat(blue,size(W,1),1), ...
'SpecularStrength',0, ...
'DiffuseStrength',0.1, ...
'AmbientStrength',1.0, ...
'EdgeColor','none','FaceAlpha',0.9,fphong);
te = tsurf(E(:,[1 2 2]),V,'EdgeColor',blue*0.75);
to = tsurf([1 1 1],V,'LineWidth',2,'EdgeColor',blue*0.5);
sc = surf(BB(:,:,1),BB(:,:,2),BB(:,:,3), ...
'CData',ch,'FaceColor','texturemap', ...
'SpecularStrength',0, 'DiffuseStrength',0, 'AmbientStrength',1);
view(130,38);
axis equal;
l = light('Position',[1 4 5.0],'Style','infinite');
% faint amient occlusion
AO = ambient_occlusion(W,G,W,per_vertex_normals(W,G),1000);
AO = AO*0.17;
tf.FaceVertexCData = bsxfun(@times,tf.FaceVertexCData,1-AO);
hold off;
axis vis3d;
camproj('persp');
set(gca,'Visible','off');
T = get(gca,'tightinset');
set(gca,'position',[T(1) T(2) 1-T(1)-T(3) 1-T(2)-T(4)]);

% Set up rotatation callbacks to hide view-dependent effects during drag
up = @() ...
set(to,'Faces', ...
outline(F((sum(N.*bsxfun(@minus,BC,campos),2)<=0),:))*[1 0 0;0 1 1]) | ...
set(h,'FaceAlpha',0.5*(g*[campos 1]'<0)) | ...
set(sc,'FaceAlpha',1.0*(g*[campos 1]'<0));
up();
down = @() set(to,'Faces',[]);
set(rotate3d,'ActionPostCallback',@(src,obj) up());
set(rotate3d,'ActionPreCallback',@(src,obj) down());

for t = linspace(0,-360,60)
view(64+t,20);
up();
drawnow;
end

Update: It even looks reasonable for less artificial shapes, though perhaps the hard edges just accidentally look fuzzy like fur:

### Two-sided material in matlab

Monday, March 23rd, 2015

Unfortunately there seems to be no builtin support for two-sided surfaces in matlab. There’s some rudimentary control over back-face lighting, but that’s all. At least you can determine the back-facing triangles for a given camera position:

N = normals(V,F);
BC = barycenter(V,F);
back_facing = sum(N.*bsxfun(@minus,BC,campos),2)<=0;

Here’s an example for an armadillo mesh:

t = tsurf(F,V,'EdgeColor','none','FaceLighting','phong');view(2);
axis equal;
camproj('persp')
t.FaceVertexCData = 1*(sum(N.*bsxfun(@minus,BC,campos),2)<=0)
apply_ambient_occlusion();

Of course, if you change the view, the coloring is no longer valid:

So you need to recompute the coloring:

You can also insert nans to achieve back-face culling:

t.FaceVertexCData(sum(N.*bsxfun(@minus,BC,campos),2)>0) = nan;

### Shallow depth of field rendering in MATLAB

Saturday, December 27th, 2014

I tried a little experiment with creating lens blur effects using the simple 3D plotter.

Here’s a little chuck of code to move the camera around a point aimed at a target point in the scene and accumulate the result in a buffer.

t = tsurf(F,V,'EdgeColor','none','SpecularStrength',0,'CData',C,fphong);
camproj('persp');
im = [];
count = 0;
sam = 50;
w = 0.2;
target = camtarget;
pos = campos;
[THETA,PHI] = meshgrid(w*linspace(-2*pi,2*pi,sam),w*linspace(-2*pi,2*pi,sam));
prev_theta = 0;
prev_phi = 0;
for s = randperm(numel(THETA))
theta = THETA(s);
phi = PHI(s);
camorbit(-prev_theta,-prev_phi);
prev_theta = theta;
prev_phi = phi;
camorbit(theta,phi);
frame = getframe(gcf);
frame = im2double(frame.cdata);
count = count+1;
if isempty(im)
im = zeros(size(frame));
end
im = im+frame;
end
im = imtrim(im/count,'Threshold',0);
close all;
imshow(im);

You can get away with fewer samples if the “size of the lens” is smaller. This one uses w=0.1; sam=10:

### Ambient occlusion + anti-aliasing in MATLAB

Wednesday, October 15th, 2014

I’m enjoying the new anti-aliased graphics in matlab 2014b. Here’s the xyzrgb dragon rendered with soft lighting, ambient occlusion and a simple colormap:

Here’s the code to reproduce it:

[V,F] = load_mesh('/Users/ajx/Documents/AutoDOF/Code/skinning/skinning/xyzrgb_dragon/xyzrgb_dragon.obj');
AO = ambient_occlusion(V,F,V,per_vertex_normals(V,F),1000);
colormap(parula(9));
t = tsurf(F,V,'EdgeColor','none');
C = squeeze(ind2rgb(floor(matrixnormalize(t.FaceVertexCData)*size(colormap,1))+1,colormap));
t.FaceVertexCData = bsxfun(@times,C,1-AO);
t.SpecularStrength = 0.1;
t.DiffuseStrength = 0.1;
t.AmbientStrength = 0.8;
l = light('Position',[1 1 100],'Style','infinite');
l2 = light('Position',[1 -100 1],'Style','infinite');
set(gca,'XTickLabel',[],'YTickLabel',[],'ZTickLabel',[],'Color',[0.94 0.94 0.94]);
set(gcf,'Color','w');
axis equal
camproj('persp');
t.Vertices = V*axisangle2matrix([0 0 1],pi)*axisangle2matrix([1 0 0],pi/2);
view(-43,6);
axis tight;
drawnow;

The ambient_occlusion call takes quite some time on my little laptop. But I think the result looks nice.

### MATLAB2014b features anti-aliasing

Monday, October 13th, 2014

Finally. I’m pretty happy about the results:

[V,F] = load_mesh('/usr/local/igl/libigl/examples/shared/cheburashka.off');
AO = ambient_occlusion(V,F,V,per_vertex_normals(V,F),1000);
t = tsurf(F,V,fphong,'EdgeColor','none');
C = squeeze(ind2rgb(floor(matrixnormalize(t.FaceVertexCData)*size(colormap,1))+1,colormap));
t.FaceVertexCData = bsxfun(@times,C,1-AO);
t.SpecularStrength = 0.1;
t.DiffuseStrength = 0.1;
t.AmbientStrength = 0.8;
l = light('Position',[1 1 100],'Style','infinite');
l2 = light('Position',[1 -100 1],'Style','infinite');
set(gca,'XTickLabel',[],'YTickLabel',[],'ZTickLabel',[],'Color',[0.94 0.94 0.94]);
set(gcf,'Color','w');

And to spin the camera around:

axis equal
axis vis3d;
camproj('persp');
for f = 1:numel(T)
t = T(f);
view(-cos(t*2*pi)*45,sin(t*2*pi)*45+45);
drawnow;
frame = getframe(gcf);
[SIf,cm] = rgb2ind(frame.cdata,256);
if f == 1
imwrite(SIf,cm,filename,'Loop',Inf,'Delay',0);
else
imwrite(SIf,cm, filename,'WriteMode','append','Delay',0);
end
end

With the awesome but now obsolete myaa.m hacked anti-aliasing, creating this gif would have taken many minutes. This runs in real time.

### Compile and run mesa on bluehost web server

Sunday, October 7th, 2012

I want to use the off-screen renderer of Mesa in a php script on my blue host served website. Compiling Mesa on my mac was dead simple (sudo port install mesa), but doing it on the linux server without root access or repositories was a bit tricky. Here’s how I finally got it to work.

Download and compile llvm, if it’s not around already. I found that version 3.1 didn’t play nicely with Mesa but 3.0 did. LLVM installed smoothly.

./configure --prefix=[INSTALL_PREFIX]
make -j5
make install

Next, grab the latest glproto headers. As far as I can tell, there is nothing to compile as only headers are needed.

export GLPROTO_LIBS=../glproto-1.4.16/;
export GLPROTO_CFLAGS=../glproto-1.4.16/;
% configure, disabling DRI support (i.e. graphics card support)
./configure --prefix=[INSTALL_PREFIX] --disable-driglx-direct --enable-xlib-glx --enable-osmesa --disable-dri
make -j5
make install

Then I got the Mesa demos and made sure I could compile src/osdemos/osdemo.c:

gcc -o osdemo osdemo.c -I[INSTALL_PREFIX]/include -L[INSTALL_PREFIX]/lib -lOSMesa -lGLU

Upon running osdemo, you might see:

./osdemo: error while loading shared libraries: libOSMesa.so.8: cannot open shared object file: No such file or directory

But this is fixed by adding you library install path to the LD_LIBRARY_PATH variable:

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:[INSTALL_PATH]/lib/  or in php:  putenv("LD_LIBRARY_PATH=".$_ENV["LD_LIBRARY_PATH"].":[INSTALL_PATH]/lib/");

If it works then you can run the program with:

./osdemo foo.tga

and produce an image like:

### Cheap tricks for OpenGL transparency

Wednesday, September 5th, 2012

I’ve been experimenting with some hacks using basic OpenGL commands to achieve high/good-quality transparency (alpha-blending).

I’ll compare 4 methods.

1. Traditional: For this one (and all the others) we turn on alpha blending:

glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);

and then just use a normal depth test without back face culling in a single pass:

glDisable(GL_CULL_FACE);
glDepthFunc(GL_LEQUAL);
// render teapot with alpha = alpha

Notice two things. The handle is not visible in the second picture and we have zebra stripe artifacts in the first picture due to alpha blending without sorting. Sorting is slow and view-dependent and won’t even guarantee correct results. So instead we’ll see how far we can get with cheap tricks.

2. GL_GREATER: This is a 3-pass attempt.

double f = 0.75; // Or some other factor
glDisable(GL_CULL_FACE);
glDepthFunc(GL_LEQUAL);
// render teapot with alpha = f*alpha

glDisable(GL_CULL_FACE);
glDepthFunc(GL_GREATER);
// render teapot with alpha = alpha

glDisable(GL_CULL_FACE);
glDepthFunc(GL_LEQUAL);
// render teapot with alpha = (alpha-f*alpha)/(1.0-f*alpha);

This often produces reasonable results but the idea is a bit strange. It’s sort like depth peeling from opposite ends. Hoping that if we only have two layers, we’ll catch both of them.

Notice now we have the handle showing up in the second image, but we still have ordering artifacts. Admittedly a lot of these would go away with back face culling, but then we don’t get two faced rending (blue inside, gold outside).

3. ALWAYS: This method will seem like a step back because it introduces more ordering artifacts due to the two-face rendering, but the concept is a bit simpler.

double f = 0.75; // Or some other factor
glDisable(GL_CULL_FACE);
glDepthFunc(GL_ALWAYS);
// render teapot with alpha = f*alpha

glDisable(GL_CULL_FACE);
glDepthFunc(GL_LEQUAL);
// render teapot with alpha = (alpha-f*alpha)/(1.0-f*alpha);

4. The idea is again the same that by taking two passes we first pick up a little bit of everything albeit not sorted in the correct order. Then we finish with one pass that ensures that the top layer is correct.

We’re getting artifacts from the ordering in the first image, but I’ll show in a second that these are just coming from not handling the two-face rendering correctly. What we see in both cases is that the bottom of the teapot shows clearly through the bottom.

5. QUINTUPLE PASS: This is the final solution that I arrived at. It involves five passes, which using display lists should be OK for many real-time applications.

glDisable(GL_CULL_FACE);
glDepthFunc(GL_LESS);
// render teapot with alpha = 0, to prime the depth buffer

glEnable(GL_CULL_FACE);
glCullFace(GL_FRONT);
glDepthFunc(GL_ALWAYS);
// render teapot with alpha = f*alpha

glEnable(GL_CULL_FACE);
glCullFace(GL_FRONT);
glDepthFunc(GL_LEQUAL);
// render teapot with alpha = (alpha-f*alpha)/(1.0-f*alpha)

glEnable(GL_CULL_FACE);
glCullFace(GL_BACK;
glDepthFunc(GL_ALWAYS);
// render teapot with alpha = f*alpha

// There's a trade off here. With culling enabled then a perfectly
// opaque object (alpha=1) may be wrong. With it disabled, ordering
// artifacts may appear
// glEnable(GL_CULL_FACE);
// glCullFace(GL_BACK);
glDisable(GL_CULL_FACE);
glDepthFunc(GL_LEQUAL);
// render teapot with alpha = (alpha-f*alpha)/(1.0-f*alpha)

The idea is that first we prepare the depth buffer with the final depth values, then we use the previous method but just to show the inside “back-facing” surface, then we do the same to show the front.

6. Now we get two very nice renderings that even participate with the background well. We can continuously blend our alpha value to 1 and expect to see a perfectly correct opaque rendering. We can notice some small ordering artifacts in the top image near the handle. If we know we want a transparent object then we can flip back face culling on for the last pass to get rid of this. But as noticed this will give an incorrect result when alpha ≈ 1.


text:
# Meaning output ANOVA post hoc tests

I am carrying out an ANOVA in Mma, and I wanted to apply a post-hoc test, but I do not understand the output that is given. It says e.g. Model-> Duncan, {4, 5} but what would that mean?

• Duncan's test effectively performs the same sequential paired comparisons as the StudentNewmanKeuls test, but with significance levels adjusted at each iteration. You can find more Information here and here. On statistical issues the guys from Cross Validated can provide better information. – user9660 Sep 17 '14 at 14:03
• The point is that I don't get why Mathamtica gives an output such as {4,5}. What does this particular output mean? – user18798 Sep 26 '14 at 10:04

The last example in the documentation for the ANOVA package ANOVA tutorial:
In your example, Model-> Duncan, {4, 5} means (1) you have set the option PostTests->Duncan in your code, and (2) groups 4 and 5 are significantly different at the 100 - x % significance level where x the significance level you have specified as the value of the option SignificanceLevel or the default value (which, I think, is5%).

format: plain


text:
# SIP-304: Liquidations (V3)

Author Draft Governance Ethereum & Optimism Daniel Beal (@dbeal-eth), Leonardo Massazza (@leomassazza), Alejandro Santander (@ajsantander) TBD 2022-05-06

## Simple Summary

This SIP proposes a mechanism for liquidations in Version 3 of the Synthetix protocol. Liquidated positions have their collateral and debt distributed among other participants in their vault. If an entire vault is liquidated, all (or part) of its collateral is seized by the system and sold to repay debt.

## Abstract

Staking positions below their minimum c-ratios can have their collateral seized by the liquidations manager, which tracks how much of this collateral each account can claim. The debt is automatically redistributed among the other accounts with collateral in the vault. If an entire vault is below its minimum C-Ratio, anyone can pay its debt with snxUSD and receive collateral.

## Motivation

The current version of the protocol implements a socialized liquidations mechanism. This proposal implements a similar system for positions within a vault, as we anticipate a pool controlled by the Spartan Council will effectively replace the current debt pool. We anticipate vault liquidations will typically occur with pools backing experimental markets. Because the v2x debt pool is undifferentiated, there isn't an analogy to the v2x system (outside of how liquidations were handled prior to SIP-148).

## Specification

### Overview

When a staking position is liquidated, the liquidator receives a fixed SCCP-configurable amount of this collateral. The staking position is closed, effectively transferring the debt responsibility to the others in the vault. The collateral delegation of the pool remains the same.

A vault’s minimum c-ratio is determined by governance, based on the type of collateral it contains. When a vault is liquidated, the liquidator provides snxUSD and receives collateral from the vault. The share of collateral received by the liquidator is determined by the proportion of the vault’s debt being provided by the liquidator (in snxUSD).

### Rationale

Due to engineering limitations related to scalability, we can’t automatically restake liquidation rewards on behalf of stakers. We would need to create a new staking position for each account participating in the vault. This could be gas intensive and disincentivize liquidators from maintaining the system's health.

This proposal departs from the existing protocol’s liquidations mechanism in that we have not included flagging functionality, where users are given a fixed period of time to fix their C-Ratio after dropping below the minimum prior to liquidation. This is because immediate liquidations are safer for the system, we already have a buffer created by the target C-Ratio requirements, and we can develop an improved notification systems to ensure that stakers are aware when their C-Ratios are falling below the target.

Also, we considered having liquidations occur on at the account level but decided against this, as liquidating an account across multiple pools would cause unnecessary implementation complexity. More importantly, this mechanism allows accounts to compartmentalize risk across different pools and collateral types.

### Technical Specification

This SIP adds two methods to the pool contract with the following functionality:

liquidatePosition(uint vaultId, uint accountId, address collateralType)

• Confirm that the specified collateral entry is below its minimum C-ratio.
• msg.sender receives the SCCP-configurable amount of liquidation rewards. If the total value of this position is less than the rewards amount, msg.sender receives the total amount of collateral in the position.
• Delete the relevant StakingPosition and reduce the totalDebtShares on the pool by the amount of shares worth the amount of debt related to this StakingPosition.
• Call acceptLiquidations on the liquidations manager with the appropriate parameters.

The Liquidations Manager will implement the following interface:

interface ILiquidationManager {
function acceptLiquidation(uint poolId, address collateralType, uint amount);
function collateralAvailable(uint poolId, uint accountId, address collateralType) view returns (uint);
}

liquidateVault(uint poolId, address collateralType, uint amount)

• Confirm that the specified vault is below its minimum C-ratio.
• Burn amount of snxUSD from msg.sender.
• Calculate what percentage of the total debt held by this vault is covered by amount. msg.sender receives this percentage of collateral held by this vault.
• Get all of the collateral (or the percentage of the collateral relative to the amount snxUSD to total debt) reducing debt shares.
• Reduce the totalDebtShares on the vault by the amount of shares worth amount.

### Test Cases

Relevant tests will be developed during implementation.

### Configurable Values (Via SCCP)

Collateral types will have an additional configurable value:

• Liquidation Reward (uint) - The amount this asset provided to a user who is liquidating a staking position in a vault holding this collateral type.

Copyright and related rights waived via CC0.


text:
# Maglev help

1. Jan 28, 2008

### Samo

i'm working on a multi-year project with my college's chapter of ASME and we're having a little difficulties finding the formulas that we need

i found the formula to determine the force in newtons being exerted by a magnetic field in newtons, but im having a lil difficulty with the formula. i can't seem to find the formula for the magnetic and electric field (im assuming that the formula that uses the 2 of them means it's for an electromagnetic field)

also, what formula would i need to determine the frequency of an electromagnetic wave, is it the same as the formula just plain old frequency?

2. Jan 30, 2008

anyone?


text:
12.1: Reference frames

Definition 12.1: Inertial Reference Frame

According to classical mechanics, a inertial reference frame $$F_I (O_I , x_I , y_I , z_I)$$ is either a non accelerated frame with respect to a quasi-fixed reference star, or either a system which for a punctual mass is possible to apply the second Newton’s law:

$\sum \vec{F}_1 = \dfrac{d(m \cdot \vec{V}_I)}{dt}\nonumber$

Definition 12.2: Earth Reference Frame

An earth reference frame $$F_e(O_e, x_e, y_e, z_e)$$ is a rotating topocentric (measured from the surface of the earth) system. The origin Oe is any point on the surface of earth defined by its latitude $$\theta_e$$ and longitude $$\lambda_e$$. Axis $$z_e$$ points to the center of earth; $$x_e$$ lays in the horizontal plane and points to a fixed direction (typically north); $$y_e$$ forms a right-handed thrihedral (typically east).

Such system it is sometimes referred to as navigational system since it is very useful to represent the trajectory of an aircraft from the departure airport.

Hypothesis 12.1: Flat earth

The earth can be considered flat, non rotating and approximate inertial reference frame. Consider $$F_I$$ and $$F_e$$. Consider the center of mass of the aircraft denoted by $$CG$$. The acceleration of $$CG$$ with respect to $$F_1$$ can be written using the well-known formula of acceleration composition from the classical mechanics:

$\vec{a}_I^{CG} = \vec{a}_e^{CG} + \vec{\Omega} \wedge (\vec{\Omega} \wedge \vec{r}_{O_I CG}) + 2 \vec{\Omega} \wedge \vec{V}_e^{CG},$

where the centripetal acceleration and the Coriolis acceleration are neglectable if we consider typical values: $$\vec{\Omega}$$, the earth angular velocity is one revolution per day; $$\vec{r}$$ is the radius of earth plus the altitude (around 6380 [km]); $$\vec{V}_e^{CG}$$ is the velocity of the aircraft in flight (200-300 [m/s]). This means $$\vec{a}_I^{CG} = \vec{a}_e^{CG}$$ and therefore $$F_e$$ can be considered inertial reference frame.

Definition 12.3: Local Horizon Frame

A local horizon frame $$F_h(O_h, x_h, y_h, z_h)$$ is a system of axes centered in any point of the symmetry plane (assuming there is one) of the aircraft, typically the center of gravity. Axes $$(x_h, y_h, z_h)$$ are defined parallel to axes $$(x_h, y_h, z_h)$$.

In atmospheric flight, this system can be considered as quasi-inertial.

Definition 12.4: Body Axes Frame

A body axes frame $$F_b(O_b,x_b,y_b,z_b)$$ represents the aircraft as a rigid solid model. It is a system of axes centered in any point of the symmetry plane (assuming there is one) of the aircraft, typically the center of gravity. Axis xb lays in to the plane of symmetry and it is parallel to a reference line in the aircraft (for instance, the zero-lift line), pointing forwards according to the movement of the aircraft. Axis $$z_b$$ also lays in to the plane of symmetry, perpendicular to xb and pointing down according to regular aircraft performance. Axis $$y_b$$ is perpendicular to the plane of symmetry forming a right-handed thrihedral ($$y_b$$ points then the right wing side of the aircraft).

Definition 12.5: Wind Axes Frame

A wind axes frame $$F_w (O_w , x_w , y_w , z_w )$$ is linked to the instantaneous aerodynamic velocity of the aircraft . It is a system of axes centered in any point of the symmetry plane (assuming there is one) of the aircraft, typically the center of gravity. Axis $$x_w$$ points at each instant to the direction of the aerodynamic velocity of the aircraft $$\vec{V}$$, Axis $$z_w$$ lays in to the plane of symmetry, perpendicular to $$x_w$$ and pointing down according to regular aircraft performance. Axis $$y_b$$ forms a right-handed thrihedral.

Notice that if the aerodynamic velocity lays in to the plane of symmetry, $$y_w \equiv y_b$$.

12.1: Reference frames is shared under a CC BY-SA 3.0 license and was authored, remixed, and/or curated by Manuel Soler Arnedo via source content that was edited to conform to the style and standards of the LibreTexts platform; a detailed edit history is available upon request.


text:
## anonymous 3 years ago i need to solve equation

• This Question is Open
1. anonymous

|dw:1351014321172:dw|

2. anonymous

|dw:1351014635037:dw|

3. anonymous

use equation i cant understand plz

4. anonymous

Here, $$\lambda$$ is a repeated eigenvalue for the linear system $$\frac{d\,\mathbf{X}}{dt} = A\mathbf{X}$$ so if $$\mathbf{X}_1(t) = (\mathbf{w} + t\mathbf{v})e^{\lambda t}$$ satisfies the linear system of equations, then $\frac{d\, \mathbf{X}_1}{d t} = \frac{d\, }{dt} \left( (\mathbf{w} + t\mathbf{v})e^{\lambda t} \right) = \frac{d\, }{dt} \left( \mathbf{w}e^{\lambda t} + t\mathbf{v}e^{\lambda t} \right) = \lambda\mathbf{w}e^{\lambda t} + \mathbf{v}e^{\lambda t} + \lambda t \mathbf{v}e^{\lambda t} = A\mathbf{X}_1$ So, by evaluating the matrix-vector multiplication on the far right hand-side, and factoring, we find $e^{\lambda t}(\lambda \mathbf{w} + \mathbf{v}) + te^{\lambda t}(\lambda \mathbf{v}) = A(\mathbf{w} + t\mathbf{v})e^{\lambda t} = e^{\lambda t}(A\mathbf{w}) + te^{\lambda t}(A\mathbf{v})$ by equating like terms, $\lambda \mathbf{w} + \mathbf{v} = A\mathbf{w} \text{ and } \lambda \mathbf{v} = A\mathbf{v}.$ For the first equation we can solve for the desired $\mathbf{v} = A\mathbf{w} - \lambda \mathbf{w} = \mathbf{w}(A - \lambda I),$ so $\mathbf{v} = \mathbf{w}(A - \lambda I)$ as desired. I hope this helps!


text:
# Addition Rule for Gaussian Binomial Coefficients

## Theorem

Let $\dbinom n m_q$ denote a Gaussian binomial coefficient.

### Formulation 1

$\dbinom n m_q = \dbinom {n - 1} m_q + \dbinom {n - 1} {m - 1}_q q^{n - m}$

### Formulation 2

$\dbinom n m_q = \dbinom {n - 1} m_q q^m + \dbinom {n - 1} {m - 1}_q$


text:
GraphTheory[SpecialGraphs][SzekeresSnark] - Maple Help

Home : Support : Online Help : Mathematics : Discrete Mathematics : Graph Theory : GraphTheory Package : SpecialGraphs : GraphTheory/SpecialGraphs/SzekeresSnark

GraphTheory[SpecialGraphs][SzekeresSnark]

GraphTheory[SpecialGraphs][DoubleStarSnark]

 Calling Sequence SzekeresSnark() DoubleStarSnark()

Description

 • A snark is a nontrivial cubic graph with chromatic index 4.
 • The SzekeresSnark command creates a snark with 50 vertices.
 • The DoubleStarSnark command creates a snark with 30 vertices.

Examples

 > $\mathrm{with}\left(\mathrm{GraphTheory}\right):$
 > $\mathrm{with}\left(\mathrm{SpecialGraphs}\right):$
 > $G:=\mathrm{SzekeresSnark}\left(\right)$
 ${G}{:=}{\mathrm{Graph 1: an undirected unweighted graph with 50 vertices and 75 edge\left(s\right)}}$ (1)
 > $\mathrm{DrawGraph}\left(G\right)$
 > $H:=\mathrm{DoubleStarSnark}\left(\right)$
 ${H}{:=}{\mathrm{Graph 2: an undirected unweighted graph with 30 vertices and 45 edge\left(s\right)}}$ (2)
 > $\mathrm{DrawGraph}\left(H\right)$


text:
# Homework Help: Difficult rational expressions thinking question

1. Mar 22, 2013

1. The problem statement, all variables and given/known data

Find the Values of B and C given this:
$$\frac{(3x-18)}{(2x+1)(7x-3)}= \frac{B}{2x+1} + \frac{C}{7x-3}$$
2. Relevant equations

The equation given:$$\frac{(3x-18)}{(2x+1)(7x-3)}= \frac{B}{2x+1} + \frac{C}{7x-3}$$

3. The attempt at a solution

My attempt:
$$\frac{(3x-18)}{(2x+1)(7x-3)}= \frac{B}{2x+1} + \frac{C}{7x-3}$$
$$\frac{(3x-18)}{(2x+1)(7x-3)}= \frac{B(2x+1)+C(7x-3)}{(2x+1)(7x-3)}$$
$$3x-18=B(2x+1)+C(7x-3)$$
At this point I'm stuck and I think something I did was wrong.
I'd appreciate any assistance that could be provided!

Last edited: Mar 22, 2013
2. Mar 22, 2013

### SammyS

Staff Emeritus
$3x-18=B(2x+1)+C(7x-3)$
is true for all values of x, then the initial rational equation
$\displaystyle \frac{(3x-18)}{(2x+1)(7x-3)}= \frac{B}{2x+1} + \frac{C}{7x-3}$
will be true for all x except 3/7 and -1/2 .

There are at least a couple of ways to solve the identity
$3x-18=B(2x+1)+C(7x-3)$
for B & C.

One is to pick a couple of values for x, which will give you two equations in the two unknowns, B & C. One such value is x = -1/2 .

Another method is to equate the coefficient of x on the left with the coefficient of x on the right; also equate the constant term on the left with the constant term on the right.

3. Mar 22, 2013

Hi, Thank You so much for your response. I was just wondering if you could clarify what you meant by this:
I apologize my math vocab is weak.

4. Mar 22, 2013

### Infrared

He means that you can expand 3x−18=B(2x+1)+C(7x−3) as 3x-18=2Bx+B+7Cx-3C. Cleaning this up a bit, we get 3x-18=(2B+7C)x+(B-3C). Two polynomials are equal only if their corresponding coefficients are equal, we get 3x=2B+7C and -18=B-3C. This is a system of equations which you should be able to sove.

5. Mar 22, 2013

But don't I have 3 variables still?

6. Mar 22, 2013

### Infrared

I am sorry, there should be no x there. If 3x=(2B+7C)x, then 3=2B+7C. I apologize for not using latex, I am just beginning to learn as I am new to these forums.

7. Mar 22, 2013

### SammyS

Staff Emeritus
If you expand the right side & collect terms, you get
$\displaystyle (2B+7C)x+(B-3C)\,,\$ right?

So, the coefficient of x on the left, which is 3 must equal the coefficient of x on the right, which is 2B+7C . Similarly, the constant term on the left must equal the constant term on the right.

These must be equal because, the equation, $\displaystyle \ 3x-18=B(2x+1)+C(7x-3)\$ is true for all possible values of x, thus this equation is an identity.

8. Mar 22, 2013

Hi! Thank you both for responding.

I'm with you guys so far until here:
$3x−18=(2B+7C)x+(B−3C){}$

I don't quite understand why $3x$ must only equal $(2B+7C)x$.

After I try and solve this is what I get. Is everything I did okay because I don't know and method of verifying if this is right (not from a textbook)?

$-18=B-3C$
$B=-18+3C$

$3x=(2B+7C)x$
$3=2B+7C$
sub in $B=-18+3C$
$3=2(-18+3C)+7C$
$3=-36+6C+7C$
$39=13C$
$C=3$

$B=-18+3C$
$B=-18+3(3)$
$B=-18+9$
$B=-9$

∴B=-9 and C=3

9. Mar 22, 2013

### Dick

Yes, you solved it right. But $$\frac{(3x-18)}{(2x+1)(7x-3)}= \frac{B}{2x+1} + \frac{C}{7x-3}$$ actually leads to the equation $$3x-18=B(7x-3)+C(2x+1)$$ Which is not what you originally posted. The B and C are backwards.

As to your first question Ax+B=Cx+D for all values of x means A=C and B=D. Can you show that?

10. Mar 22, 2013

Ah, I plugged in the values of B and C and the expressions on both sides were equal. And that quote clarified quite a lot.

Thank you so much to all of you for the help!

11. Mar 23, 2013

### SammyS

Staff Emeritus
Sorry. I didn't check the details.


text:
You are not logged in. Please login at www.codechef.com to post your questions!

×

# NOSS - Editorial

Author: AmirReza PoorAkhavan
Tester: Danial Erfanian
Editorialist: Michael Nematollahi

DP, KNAPSACK

# PROBLEM:

You are given a set of positive integers $a$. You are asked to replace any two of those numbers with any pair of positive integers so that the number of values you can obtain by adding up a subset of them (possibly empty) is maximized. You need to print this maximum number of values.

# QUICK EXPLANATION:

The answer is "the maximum NOSS over all subsets of size $N-2$" $\times 4$.
Let's define $dp[i]$ as the number of subsets whose sum is equal to $i$. $dp$ can be calculated using the well-known knapsack problem.
Now, for each unique pair of numbers in the set, try removing them and calculating the NOSS of the rest of the numbers. It can be proven that the number of unique pairs of numbers in the set is of $O(S)$, where $S$ is the sum of all of the numbers in the set. You can remove the pair from the $dp$ array in $O(S)$ and then count how many of the slots in $dp$ are greater than $0$ modulo some big prime MOD (like $10^9 + 7$). The probability that those slots really contain $0$ and not just $0$ modulo MOD is very high. This way, we can calculate NOSS of the rest of the numbers.
This solution runs in $O(S^2)$.

# EXPLANATION:

First of all, let's define $S$ as the sum of all the integers given in the input. The problem's description guarantees that $S \leq 10^4$.

Let's prove that there are at most $O(\sqrt{S})$ different numbers in $a$.
The proof is relatively simple. Let's assume that there are $K$ different numbers in $a$. Now, let's sort these $K$ numbers. The first one is at least $1$, the second one is at least $2$, the third one is at least $3$ and so on. This gives us $S \geq \frac{K \times (K+1)}{2}$. Hence, $K$ is of $O(\sqrt{S})$.

Since there are ${K+1}\choose{2}$ unique pairs of numbers to change, the abovementioned fact tells us there are at most $O(S)$ unique pairs of numbers to change.

The description of the problem tells us we can change two numbers to any natural number. Let's think of it as removing two numbers, making a new set out of the remaining $N-2$ numbers, and then adding two arbitrary numbers to that set. By adding a number to a set, its NOSS can get doubled at most; and we can achieve that increment by choosing a very large number to add. With the same reasoning, by adding two numbers we can increase the NOSS of the set $3$ times. Or in other words, we'd be multiplying the NOSS of the set of size $N-2$ by $4$. So all that's left is to calculate for each unique pair of integers from the set, what will the NOSS of the set be after removing them.

Let's define $dp[i]$ as the number of subsets of $a$ whose sum is equal to $i$. You can calculate this dp by inserting the numbers one by one, something like this:

for (int i = MAXN-1; i >= x; i--)
dp[i] += dp[i-x];

Now let's iterate over all unique pairs of numbers from $a$ and try removing them from $dp$. The removal can be done like this:

for (int i = x; i < MAXN; i++)
dp[i] -= dp[i-x];

After removing the pair, go through all the slots of $dp$ and count how many of them are greater than $0$. This gives us a solution of $O(S^2)$.

One problem remains though. The numbers in the $dp$ array can get arbitrarily large. To avoid overflow, we can do all of our calculations modulo some big prime called MOD. MOD can be $10^9 + 7$. The only problem with this approach is that if $dp[i] = 0$, we assume that $dp[i]$ really is equal to $0$ and not just equal to $0$ modulo MOD. But The probability of this assumption failing is low and thus this solution works.

Refer to the editorialist's solution to see the described solution.

# AUTHOR'S AND TESTER'S SOLUTIONS:

Author's solution can be found here

Tester's solution can be found here

Editorialist's solution can be found here

This question is marked "community wiki".

asked 29 Dec '18, 09:05

7★watcher
37
accept rate: 0%

19.8k350498541

 0 Finally, the long-awaited editorial for this problem. Thanks! Looking forward to reading the editorial of this problem as well in near future. https://www.codechef.com/LTIME66A/problems/MDN Please admin look into it, really need the editorial to the "median" problem. link This answer is marked "community wiki". answered 22 Jan, 00:09 144●6 accept rate: 0%
 toggle preview community wiki:
Preview

### Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

Markdown Basics

• *italic* or _italic_
• **bold** or __bold__
• image?![alt text](/path/img.jpg "title")
• numbered list: 1. Foo 2. Bar
• to add a line break simply add two spaces to where you would like the new line to be.
• basic HTML tags are also supported
• mathemetical formulas in Latex between \$ symbol

Question tags:

×15,852
×2,212
×86
×41

question asked: 29 Dec '18, 09:05

question was seen: 162 times

last updated: 22 Jan, 00:09


text:
Chemistry » Chemical Bonding » Strengths of Ionic and Covalent Bonds

# Summarizing Strengths of Ionic and Covalent Bonds

## Key Concepts and Summary

The strength of a covalent bond is measured by its bond dissociation energy, that is, the amount of energy required to break that particular bond in a mole of molecules. Multiple bonds are stronger than single bonds between the same atoms. The enthalpy of a reaction can be estimated based on the energy input required to break bonds and the energy released when new bonds are formed.

For ionic bonds, the lattice energy is the energy required to separate one mole of a compound into its gas phase ions. Lattice energy increases for ions with higher charges and shorter distances between ions. Lattice energies are often calculated using the Born-Haber cycle, a thermochemical cycle including all of the energetic steps involved in converting elements into an ionic compound.

## Key Equations

• Bond energy for a diatomic molecule: $$\text{XY}\left(g\right)\phantom{\rule{0.2em}{0ex}}⟶\phantom{\rule{0.2em}{0ex}}\text{X}\left(g\right)+\text{Y}\left(g\right)\phantom{\rule{3em}{0ex}}{\text{D}}_{\text{X–Y}}=\text{Δ}H\text{°}$$
• Enthalpy change: ΔH = ƩDbonds broken – ƩDbonds formed
• Lattice energy for a solid MX: $$\text{MX}\left(s\right)\phantom{\rule{0.2em}{0ex}}⟶\phantom{\rule{0.2em}{0ex}}{\text{M}}^{n\text{+}}\left(g\right)+{\text{X}}^{n\text{−}}\left(g\right)\phantom{\rule{3em}{0ex}}\text{Δ}{H}_{\text{lattice}}$$
• Lattice energy for an ionic crystal: $$\text{Δ}{H}_{\text{lattice}}=\phantom{\rule{0.2em}{0ex}}\frac{\text{C}\left({\text{Z}}^{\text{+}}\right)\left({\text{Z}}^{\text{−}}\right)}{{\text{R}}_{\text{o}}}$$

## Glossary

### bond energy

(also, bond dissociation energy) energy required to break a covalent bond in a gaseous substance

### Born-Haber cycle

thermochemical cycle relating the various energetic steps involved in the formation of an ionic solid from the relevant elements

### lattice energy (ΔHlattice)

energy required to separate one mole of an ionic solid into its component gaseous ions

This is a lesson from the tutorial, Chemical Bonding and you are encouraged to log in or register, so that you can track your progress.


text:
# WebGL wrong scaling of rectangle

I'm working with this tutorial http://www.html5rocks.com/en/tutorials/webgl/webgl_transforms/

and my result is, that the rectangle moves in the direction of it's scaling values, and also scales at the same time. So if I scale (2.0, 1.0) it moves right and stretches, but I only want to strecht/scale it. This is my vertex shader, it is nearly the same as in the tutorial (declarations omitted):

void main(void) {
vec2 scaledPosition = a_position * u_scale;

vec2 rotatedPosition = vec2(
scaledPosition.x * u_rotation.y + scaledPosition.y * u_rotation.x,
scaledPosition.y * u_rotation.y - scaledPosition.x * u_rotation.x);

vec2 pos = rotatedPosition + u_translation;

vec2 zeroToOne = pos / u_resolution;
vec2 zeroToTwo = zeroToOne * 2.0;
vec2 clipSpace = zeroToTwo - 1.0;

v_texCoord = a_texCoord;

gl_Position = vec4(clipSpace, 0, 1);
}

What could be the mistake if it is not in the shader? Thanks in advance.

• What exactly are you trying to achieve? When you say you want to scale something, generally that means uniformly expanding/contracting in all directions. – Andon M. Coleman May 16 '14 at 1:41

Vertex shader goes through each vertex individually, and applies maths to it.
Here you take position of your vertices, and multiply it by scale. That means if you multiply X by 2.0 (scale), then when you move all vertices right in vertex buffer by 2.0 in shader it will turn into 4.0 (as you multiply then).

What you really want is to have position of entity, and then position of vertices expressed by vertex buffer.
Then you will scale vertices the way as you do, but then will add position of entity (vec2 in your case) to move object around.
So vertex position will be local and scale will be so.

Some pseudo code (for shader):

scaled_vertex_position = vertex_local_position * scale;
scaled_and_rotated_vertex_position = ..rotate..;
final_vertex_position = scaled_and_rotated_vertex_position + entity_position;

• Thanks for your answer. Sounds like your suggestion would go in the right direction. But I didn't figure out what you exactly mean. Do you have pseudocode for me that would help. Thanks again :) – Kronos May 19 '14 at 14:13
• Added some pseudo code. – Maksims Mihejevs May 19 '14 at 15:10
• So I should to the scaling on the cpu. But I don't have access to widths and heights anymore, since it's in a buffer. And I do not want to update the buffer everytime. The link I posted above from the tutorial shows a way exactly how it should be on the vertex shader and the demo works, like I want it, but why doesn't it translate while scaling as it does in my code? – Kronos May 19 '14 at 17:18
• No, this pseudo code is for shader, not CPU. – Maksims Mihejevs May 19 '14 at 17:26


text:
11th House Lord In 12th House

11th house lord in 12th house 1) Before knowing the effect of 11th house lord in 12th house we have to know about Eleventh House and Twelfth House. As 11th house lord is placed in 2nd from own house so you may read First House Lord In 2nd house. 2)…

11th House Lord In 11th House

11th house lord in 11th house 1)  Before knowing the effect of 11th house lord in 11th house we have to know about Eleventh House. As 11th house lord placed in 11th house  First House Lord In First House. 2) According to Brihat Parasar Hora Shastra  लाभेशे लाभभावस्थे लाभः सर्वेषु कर्मेसु।…

11th House Lord In Tenth House

11th house lord in 10th house 1) Before knowing the effect of 11th house lord in 10th house we have to know about Eleventh House and Tenth House. As 11th house lord in 12th from own house so you may read First house lord in 12th house. 2)  According to Brihat…

11th House Lord In Ninth House

11th house lord in 9th house 1) Before knowing the effect of 11th house lord in 9th house we have to know about Eleventh House and Ninth House. As 11th house lord is placed 11th from own house so you may read First house lord in 11th house. 2) According…

11th House Lord In Eight House

11th house lord in 8th house 1) Before knowing the effect of 11th house lord in 8th house we have to know about Eleventh House and Eight House. As 11th house lord is placed in 8th house which is 10th house away own house so you may read First house…

11th House Lord In Seventh House

11th house lord in 7th house 1) Before knowing the effect of 11th house lord in 7th house we have to know about Eleventh House and Seventh House. As 11th house lord placed in 7th house is 9th house away from own house so you may read First house lord…

11th House Lord In Sixth House

11th house lord in 6th house 1) Before knowing the effect of 11th house lord in 6th house we have to know about Eleventh House and Sixth House. As 11th house lord is just placed 8th from own house so you may read First House Lord In 8th House. 2)…

11th House Lord In Fifth House

11th house lord in 5th house 1) Before knowing the effect of 11th house lord in 5th house we have to know about Eleventh House  and Fifth House. As 11th house lord is placed in 5th house which is 7th from own house so you may read First house lord…

11th House Lord In Fourth House

11th house lord in 4th house 1) Before knowing the effect of 11th house lord in 4th house we have to know about Eleventh House and Fourth house. As 11th house lord is placed just 6th from own house so you may read First house lord in 6th house. 2)…


text:
# Matrix of a linear mapping

1. Jul 25, 2012

### juanma101285

Hi, I have the following problem that is solved, but I get lost at one step and cannot find how to do it in the notes. I would really appreciate it if someone could tell me where my teacher gets the result from.

The problem says:

"Find the matrix of linear mapping $T:P_3 → P_3$ defined by

$(Tp)(t)=p(t)+p'(t)+p(0)$

with respect to the basis {$1,t,t^2,t^3$} of $P_3$. Deduce that, given $q \in P_3$, there exists $p \in P_3$ such that
$q(t)=p(t)+p'(t)+p(0)$."

And I get lost here... It says:

"We have

$T(1)=2$
$T(t)=1+t$
$T(t^2)=2t+t^2$
$T(t^3)=3t^2+t^3$"

So I don't know why it says $T(1)=2$.... I think $T(t)=1+t$ because it is the derivative of t plus t, and $T(t^2)$ is the derivative of $t^2$ plus $t^2$... But why T(1)=2?

Thanks a lot!

2. Jul 25, 2012

### Muphrid

I think this would be clearer written slightly differently.

$$T[p(t)] = p(0) + \frac{dp}{dt} + p(t)$$

When you say $T(1)$, you substitute $p(t) = 1$ into the above. Clearly, then, $p(0) = 1$ because $p(t) = 1$ for any $t$. That takes care of the first and last terms. The derivative is zero because $p$ is a constant.

In short, you get

$$T(1) = 1 + 0 + 1 = 2$$

3. Jul 25, 2012

### Fredrik

Staff Emeritus
T takes polynomials to polynomials, so when he writes T(1), 1 denotes a polynomial. The only polynomial that it makes sense to denote by 1 is the function that takes every real number to 1. It might be less confusing to denote it by a symbol like I instead. Then for all real numbers t, we have $(T(I))(t)=I(t)+I'(t)+I(0)=1+0+1$, as Muphrid has already said. So T(I) is the polynomial that takes every real number t to 2. In this context, it seems to be standard to denote this polynomial by 2.

I think this notation is worse, because now it looks like T is acting on the real number p(t) instead of on the polynomial p.

Last edited: Jul 25, 2012
4. Jul 25, 2012

### Fredrik

Staff Emeritus
I don't understand this argument. To find T(t), you need to do something similar to what I did above.

Here t denotes the identity map on the set of real numbers, i.e. the function that takes every real number to itself. If we use this notation, then for all real numbers s, we have
$(T(t))(s)=t(s)+t'(s)+t(0)=s+1+0$. So T(t) is the polynomial that takes s to 1+s. In this notation, that polynomial is denoted by 1+t.

This problem shows how confusing it can be to use notations like t2 both for a number (the square of the number t) and a function (the function that takes every real number to its square). I would prefer to use a different notation for the basis vectors, for example $\{e_1,e_2,e_3,e_4\}$ instead of $\{1,t,t^2,t^3\}$, where the $e_i$ are defined by
$e_1(s)=1$ for all s.
$e_2(s)=s$ for all s.
...and so on.

Now what the problem writes as T(1) and T(t) can be written as $Te_0$ and $Te_1$ respectively, and for all $t\in\mathbb R$,
$Te_1(t)=e_1(t)+e_1'(0)+e_1(0)=1+0+1=2=2(e_1(t))=(2e_1)(t),$
$Te_2(t)=e_2(t)+e_2'(0)+e_2(0)=t+1+0=e_2(t)+e_1(t)=e_1(t)+e_2(t)=(e_1+e_2)(t)$.

Since this holds for all t, we have $Te_1=2e_1$ and $Te_2=e_1+e_2$.

Can you do $T(t^2)$ and $T(t^3)$ now? You can stick to the t^something notation if it doesn't confuse you, but then you will have to write weird things like ${t^2}'(s)=2s$.

Last edited: Jul 25, 2012
5. Jul 26, 2012

### HallsofIvy

Staff Emeritus
The derivative of the polynomial p(t)= 1 (for all t) is 0 so p(t)+ p'(t)+ p(0)= 1+ 0+ 1= 2.

More precisely p(t)+ p'(t)+ p(0)= t+ 1+ 0= t+ 1

Again, $p(t)+ p'(t)+ p(0)= t^2+ 2t+ 0= t^2+ 2t$


text:
##### Question Info

This question is public and is used in 84 tests or worksheets.

Type: Multiple-Choice
Category: Fractions and Ratios
Standards: 4.NF.B.3, 4.NF.B.3b
Author: LBeth

View all questions by LBeth.

# Fractions and Ratios Question

View this question.

Add this question to a group or test by clicking the appropriate button below.

## Grade 4 Fractions and Ratios CCSS: 4.NF.B.3, 4.NF.B.3b

$3/8$ of the fireworks are yellow. The remaining fireworks are red and blue. Which set of fractions could represent the fraction of fireworks that are red and blue?
1. $1/8$ and $2/8$
2. $1/8$ and $4/8$
3. $3/8$ and $5/8$
4. $3/8$ and $6/8$
You need to have at least 5 reputation to vote a question down. Learn How To Earn Badges.


text:
### Home > PC3 > Chapter 13 > Lesson 13.1.4 > Problem13-51

13-51.

Identify all of the roots of the polynomial $p\left(x\right) = x^{3} + 4x^{2} + 6x + 4$.

Graphing the polynomial reveals that $x = −2$ is a root.
Divide out the corresponding factor $\left(x + 2\right)$.
Then use the Quadratic Formula to solve for the roots related to the resulting polynomial.


text:
# Page 3 model: When zombies attack

Every issue we feature another great model on page 3 of our magazine. This time we look at what to do when zombies attack.

Run? Kill? Ask nicely? (Source: flickr.com/joelf)

Every issue we feature another great model on page 3 of our magazine. This issue it’s this:

\begin{align*}
S’ &= \Pi – \beta S Z – \delta S,\\
Z’ &= \beta S Z + \zeta R – \alpha S Z ,\\
R’ &= \delta S + \alpha S Z – \zeta R.
\end{align*}

This is a model of a zombie outbreak as proposed in When Zombies Attack! by Philip Munz, Ioan Hudea, Joe Imad and Robert J. Smith? (the question mark is not a typo; it is part of his name).

The model features three populations: S, the susceptible or living humans; Z, the zombies; and R, the removed or dead humans. Humans can move between these three groups. The rates of movement are modelled by the following parameters:

α, the rate at which humans can kill zombies,
β, the rate at which live humans are infected and become zombies,
δ, the rate of non-zombie related death in the live humans,
ζ, the rate at which the dead rise again as zombies,
Π, the human birth rate (assumed to be constant).

The terms in the model can be nicely shown in the following diagram:

See how the number of susceptibles feeds the number of zombies, etc.

Munz, Hudea, Imad and Smith? showed that unless a zombie outbreak could be ended quickly by a swift killing of zombies then the human population will eventually become entirely zombie.

• ### Reproduce or die

Play the variation on Conway's Game of Life!
• ### Talkdust, episode 4

A podcast for the mathematically curious
• ### Read Issue 09 now!

Ride a phantom parabola into our latest issue. Billiards, maths, tiles, mistakes, plus all your favourite regulars.
• ### Dear Dirichlet, Issue 09

Coffee, Brexit and badgers are among the topics of discussion in this issue's Dear Dirichlet advice column
• ### Horoscope, Issue 09

Mystic mug has some predictions for you...
• ### Top Ten: Chalkdust regulars

The definitive chart of the best Chalkdust regulars


text:
# Comparison Principle for Extremal Length

## Theorem

Let $X$ be a Riemann surface.

Let $\Gamma_1$ and $\Gamma_2$ be families of rectifiable curves (or, more generally, families of unions of rectifiable curves) on $X$.

Let every element of $\Gamma_1$ contain some element of $\Gamma_2$.

Then the extremal lengths of $\Gamma_1$ and $\Gamma_2$ are related by:

$\lambda \left({\Gamma_1}\right) \ge \lambda \left({\Gamma_2}\right)$

More precisely, for every conformal metric $\rho$ as in the definition of extremal length, we have:

$L \left({\Gamma_1, \rho}\right) \ge L \left({\Gamma_2, \rho}\right)$

## Proof

We have:

 $\displaystyle L \left({\Gamma_1, \rho}\right)$ $=$ $\displaystyle \inf_{\gamma \mathop \in \Gamma_1} L \left({\gamma, \rho}\right)$ $\quad$ by definition $\quad$ $\displaystyle$ $\ge$ $\displaystyle \inf_{\gamma \mathop \in \Gamma_2} L \left({\gamma, \rho}\right)$ $\quad$ since every curve of $\Gamma_1$ contains a curve of $\Gamma_2$ $\quad$ $\displaystyle$ $=$ $\displaystyle L \left({\Gamma_2, \rho}\right)$ $\quad$ by definition $\quad$

This proves the second claim.

The second claim implies the first by definition.

$\blacksquare$


text:
Chapter 115

### Introduction

Ironically there is no organ about which more misinformation has been perpetuated than the penis.

William Masters & Virginia Johnson, Human Sexual Response (1970)

The most common penile disorders are those of psychosexual dysfunction and STIs, but there are many other problems and these are most often related to the foreskin.

#### DISORDERS AFFECTING FORESKIN AND GLANS

##### Phimosis

Phimosis is tightness of the foreskin (prepuce), preventing its free retraction over the glans penis. The foreskin is normally attached to the glans and is non-retractile in most newborns; it may remain so until puberty.1,2 The proportion of boys with retractile foreskins is: 40% at 1 year, 90% at 4 years and 99% at 15 years.3 Forceful retraction of the penis should be avoided until spontaneous separation occurs.1 Once the foreskin easily retracts, the boy should learn to do this as part of normal washing, ensuring he rinses off any soap and pushes the foreskin back over the glans afterwards.4

‘True’ phimosis is caused by forceful retraction, infection or balanitis xerotica obliterans (see later in this chapter).1,2 Indicators of true phimosis (rather than simple non-retractile foreskin) are:3

• foreskin not retractile by the time of established puberty

• previously retractile foreskin becomes non-retractile

• obvious ring of scar tissue at foreskin opening

• inability to visualise the urethral meatus when foreskin opening is lifted away from glans

• ballooning during and after micturition, with pinhole foreskin opening and a squirting urinary stream (though mild ballooning during micturition is common and normal)

Treatment

Inflammatory phimosis can be treated by local corticosteroid cream (e.g. 0.05% betamethasone valerate cream qid for 2–4 weeks)3 applied generously to the tight shiny part of the foreskin where inner skin meets the outer skin. If the tip of the foreskin is inflamed, gently retracting it will cause the inflamed opening to ‘cauliflower’ up so the cream can be applied. A stronger steroid cream can be tried if this fails.

True scarring that fails to respond to steroid creams may require circumcision, though this is uncommon.1,2 Some patients with true phimosis may have problems once they start to have intercourse and will require circumcision.

##### Paraphimosis

Paraphimosis occurs when a tight foreskin is forcibly retracted over the glans, gets stuck in the sulcus and cannot be pulled forward again. The glans and the foreskin distal to the tight area become swollen and painful (see FIG. 115.1) and this demands urgent resolution.1 This problem occurs in boys aged 8–12 and the elderly, especially if a mild degree of phimosis is already present. Typically it occurs when the penis is erect or after catheterisation.

###### FIGURE 115.1

Paraphimosis showing ...

Sign in to your MyAccess profile while you are actively authenticated on this site via your institution (you will be able to verify this by looking at the top right corner of the screen - if you see your institution's name, you are authenticated). Once logged in to your MyAccess profile, you will be able to access your institution's subscription for 90 days from any location. You must be logged in while authenticated at least once every 90 days to maintain this remote access.

Ok

## Subscription Options

### Murtagh Collection Full Site: One-Year Subscription

Connect to a suite of general practice resources from one of the most influential authors in the field. Learn the breadth of general practice, including up-to-date information on diagnosis and treatment, as well as key clinical skills like communication.


text:
# Statistics students at a state college compiled the following two-way table from a sample of randomly selected students at their c

Statistics students at a state college compiled the following two-way table from a sample of randomly selected students at their college:
$\begin{array}{|ccc|}\hline & \text{Play chess}& \text{Don`t play chess}\\ \text{Male students}& 25& 162\\ \text{Female students}& 19& 148\\ \hline\end{array}\phantom{\rule{0ex}{0ex}}$
Answer the following questions about the table. Be sure to show any calculations.
What question about the population of students at the state college would this table attempt to answer?
State ${H}^{0}$ and ${H}^{1}$ for the test related to this table.

You can still ask an expert for help

## Want to know more about Two-way tables?

• Questions are typically answered in as fast as 30 minutes

Solve your problem for the price of one coffee

• Math expert for every subject
• Pay only if we can solve it

Khribechy

Step 1: Information from the table
We have given that the two-way table from a sample of randomly selected students at their college. From the table, we can see that there are two attributes. one is gender (Male and female students) and other is choice (Play chess and don't play choice). So, one can ask a question that whether the two attribute dependent or not. It means whether there is a relationship between gender and choice.
Step 2: Formation of ${H}^{0}$ and ${H}^{1}$
It is clear that the given table is a contingency table of 2 variable (attribute). So, in order to test the relationship between these one can apply chi-square independence of attribute test. In this case, we can define
${H}^{0}$: There is no dependency on the choice of play chess and gender
${H}^{1}$: There is the dependency of choice of play chess and gender


text:
# How do you write the nth term rule for the sequence 11/2,25/6,17/6,3/2,1/6,...?

${a}_{0} = \frac{33}{6} = \frac{11}{2}$, ${a}_{k} = \frac{33 - 8 k}{6}$
$\frac{33}{6} , \frac{25}{6} , \frac{17}{6} , \frac{9}{6} , \frac{1}{6} , - \frac{7}{6} , - \frac{15}{6} \cdots$
Calling ${a}_{0} = \frac{33}{6} = \frac{11}{2}$ then ${a}_{k} = \frac{33 - 8 k}{6}$


text:
GMAT Question of the Day - Daily to your Mailbox; hard ones only

 It is currently 23 Mar 2019, 05:50

### GMAT Club Daily Prep

#### Thank you for using the timer - this advanced tool can estimate your performance and suggest more practice questions. We have subscribed you to Daily Prep Questions via email.

Customized
for You

we will pick new questions that match your level based on your Timer History

Track

every week, we’ll send you an estimated GMAT score based on your performance

Practice
Pays

we will pick new questions that match your level based on your Timer History

# For each positive integer n, the nth positive triangular number is equ

Author Message
TAGS:

### Hide Tags

GMATH Teacher
Status: GMATH founder
Joined: 12 Oct 2010
Posts: 910
For each positive integer n, the nth positive triangular number is equ  [#permalink]

### Show Tags

24 Feb 2019, 13:36
00:00

Difficulty:

65% (hard)

Question Stats:

45% (02:35) correct 55% (02:02) wrong based on 20 sessions

### HideShow timer Statistics

GMATH practice exercise (Quant Class 17)

For each positive integer n, the nth positive triangular number is equal to the number of dots in the triangular arrangement with n dots on a side. The first positive triangular numbers are 1, 3, 6, 10, 15, and 21, as shown. Which of the following numbers is NOT a positive triangular number?

(A) 105
(B) 210
(C) 300
(D) 311
(E) 378

_________________

Fabio Skilnik :: GMATH method creator (Math for the GMAT)
Our high-level "quant" preparation starts here: https://gmath.net

Intern
Joined: 19 Feb 2019
Posts: 20
Re: For each positive integer n, the nth positive triangular number is equ  [#permalink]

### Show Tags

24 Feb 2019, 15:01
So study these numbers carefully. You will fibd that T(n)= Sum of all natural numbers from 1 to n. We know that this sum is given by the general formula (n(n+1))/2.

So one method can be assuming that each of these options is given by such a formula and trying to find a value of n that satisfies it. The one for which this is not possible is your answer. Right now i can’t think of any other method off the cuff. So let me fasten up the above method for you. I’ll update here if i think of some other method.

Assume each option = n(n+1)/2
So 2* each option = product of 2 consecutive nunbers. Let’s consider each option now.

As you browse the options you’ll find that 311 is prime so 311*2 can never be expressed as the sume of 2 consecutive numbers so the answer is D

Cheers

Posted from my mobile device
SVP
Joined: 18 Aug 2017
Posts: 2450
Location: India
Concentration: Sustainability, Marketing
GPA: 4
WE: Marketing (Energy and Utilities)
Re: For each positive integer n, the nth positive triangular number is equ  [#permalink]

### Show Tags

25 Feb 2019, 08:27
fskilnik wrote:
GMATH practice exercise (Quant Class 17)

For each positive integer n, the nth positive triangular number is equal to the number of dots in the triangular arrangement with n dots on a side. The first positive triangular numbers are 1, 3, 6, 10, 15, and 21, as shown. Which of the following numbers is NOT a positive triangular number?

(A) 105
(B) 210
(C) 300
(D) 311
(E) 378

values of the triangular no are given n*(n+1)/2
so out of given options 311 is prime no. which is not possible
IMO D
_________________

If you liked my solution then please give Kudos. Kudos encourage active discussions.

GMATH Teacher
Status: GMATH founder
Joined: 12 Oct 2010
Posts: 910
Re: For each positive integer n, the nth positive triangular number is equ  [#permalink]

### Show Tags

25 Feb 2019, 12:39
fskilnik wrote:
GMATH practice exercise (Quant Class 17)

For each positive integer n, the nth positive triangular number is equal to the number of dots in the triangular arrangement with n dots on a side. The first positive triangular numbers are 1, 3, 6, 10, 15, and 21, as shown. Which of the following numbers is NOT a positive triangular number?

(A) 105
(B) 210
(C) 300
(D) 311
(E) 378

$${T_n} = 1 + 2 + \ldots + n\,\,\,\,\left( {n \ge 1\,\,{\mathop{\rm int}} } \right)$$

$${T_n} = {{n \cdot \left( {n + 1} \right)} \over 2}\,\,\,\,\,\,\left[ {{\rm{arithmetic}}\,\,{\rm{sequence}}} \right]$$

$$?\,\,\,:\,\,\,\underline {{\rm{not}}} \,\,\,T$$

$$\left( A \right)\,\,\left\{ \matrix{ \,n \cdot \left( {n + 1} \right) = 2 \cdot 105 = 210 \hfill \cr \,15 \cdot 15 = 225 \hfill \cr} \right.\,\,\,\,\,\mathop \Rightarrow \limits^{{\rm{try}}!} \,\,\,\,{{14 \cdot 15} \over 2} = 7 \cdot 15 = 105\,\,\,{\rm{works}}!\,\,\,\,\, \Rightarrow \,\,\,\,\,105 = {T_{14}}$$

$$\left( B \right)\,\,\left\{ \matrix{ \,n \cdot \left( {n + 1} \right) = 2 \cdot 210 = 420 \hfill \cr \,20 \cdot 20 = 400 \hfill \cr} \right.\,\,\,\,\,\mathop \Rightarrow \limits^{{\rm{try}}!} \,\,\,\,{{20 \cdot 21} \over 2} = 10 \cdot 21 = 210\,\,\,{\rm{works}}!\,\,\,\,\, \Rightarrow \,\,\,\,\,210 = {T_{20}}$$

$$\left( C \right)\,\,\left\{ \matrix{ n \cdot \left( {n + 1} \right) = 2 \cdot 300 = 600 \hfill \cr 25 \cdot 25 = 625 \hfill \cr} \right.\,\,\,\,\,\mathop \Rightarrow \limits^{{\rm{try}}!} \,\,\,\,{{24 \cdot 25} \over 2} = 12 \cdot 25 = 300\,\,\,{\rm{works}}!\,\,\,\,\, \Rightarrow \,\,\,\,\,300 = {T_{24}}$$

$$\left( D \right)\,\,\,{T_{24}} < 311 < 300 + 25 = {T_{24}} + 25 = {T_{25}}$$

We follow the notations and rationale taught in the GMATH method.

Regards,
Fabio.
_________________

Fabio Skilnik :: GMATH method creator (Math for the GMAT)
Our high-level "quant" preparation starts here: https://gmath.net

Re: For each positive integer n, the nth positive triangular number is equ   [#permalink] 25 Feb 2019, 12:39
Display posts from previous: Sort by


text:
# In a linearly independent set of vectors, there is an inner product such that $\langle v_i,v_j\rangle=0$ for every $i\neq j$?

It is true that every orthogonal set of non-null vectors are linearly independent. Is the converse true? That is, if $\{v_1,\cdots,v_n\}$ is a linearly independent set of vectors, then there is an inner product such that $\langle v_i,v_j\rangle=0$ for every $i\neq j$.

Yes, you can complete $v_1,..,v_n$ to a basis $v_1,..,v_n,..,v_m$ define the scalar product, $\langle v_i,v_j\rangle =\delta_{ij}$. If $x=\sum_{i=1}^{i=m}x_iv_i$ and $y=\sum_{i=1}^{i=m}y_iv_i$, then $\langle x,y\rangle =\sum_{i=1}^{i=m} x_iy_i$.
• What if $n$ is less than the dimension of the space? Isn't your answer assuming that the $\{v_1, ..., v_n\}$ is a basis? What if the space is infinite dimensional? – Tom Aug 11 '16 at 15:30


text:
#### Archived

This topic is now archived and is closed to further replies.

# visual c++ question

This topic is 5743 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

i just want to know something about visual c++ 6. How do you build a final? in the build menu there is a one called set active configuration. in that you can select debug or release. when i select debug it compiles but when i do release i get lots of linking errors. i think there all open gl ones. how do you make it work and what does it do?

##### Share on other sites
Make sure your project settings for debug and release are the same (things such as linked libraries and the like).

Go to project->settings, and in the top-left corner you will see "settings for:" (debug/release/all).

Just check to see if there are any debug settings that you forgot to replicate to release.

##### Share on other sites
Try these lines in your source-code if you don''t want to mess abround with the project settings:
#pragma comment (lib, "opengl32.lib")#pragma comment (lib, "glu32.lib")#pragma comment (lib, "glaux.lib")

think that should do it...

god speed


text:
# Near optimal bounds in Freiman's theorem

@article{Schoen2011NearOB,
title={Near optimal bounds in Freiman's theorem},
author={Tomasz Schoen},
journal={Duke Mathematical Journal},
year={2011},
volume={158},
pages={1-12}
}
• T. Schoen
• Published 15 May 2011
• Mathematics
• Duke Mathematical Journal
We prove that if for a finite set A of integers we have |A+A| ≤ K|A|, then A is contained in a generalized arithmetic progression of dimension at most K −1/2 and size at most exp(K −1/2 )|A| for some absolute constant C. We also discuss a number of applications of this result.
On the Bogolyubov–Ruzsa lemma
Our main result is that if A is a finite subset of an abelian group with |A+A| < K|A|, then 2A-2A contains an O(log^{O(1)} K)-dimensional coset progression M of size at least exp(-O(log^{O(1)} K))|A|.
Additive Volume of Sets Contained in Few Arithmetic Progressions
• Mathematics
Integers
• 2019
The formula for the largest volume of a finite set of integers with given cardinality and doubling is extended to sets of every dimension and proved for sets composed of three segments, giving structural results for the extremal case.
Large values of the additive energy in R
Combining Freiman’s theorem with Balog–Szemerédi–Gowers theorem one can show that if an additive set has large additive energy, then a large piece of the set is contained in a generalized arithmetic
Small Doubling in Groups
• Mathematics
• 2013
Let A be a subset of a group G = (G; ·). We will survey the theory of sets A with the property that |A · A|≤K|A|, where A · A = {a1a2: a1; a2 ∈ A}. The case G = (ℤ; +) is the famous Freiman-Ruzsa
Some new inequalities in additive combinatorics
In the paper we find new inequalities involving the intersections $A\cap (A-x)$ of shifts of some subset $A$ from an abelian group. We apply the inequalities to obtain new upper bounds for the
ADDITIVE DIMENSION AND A THEOREM OF SANDERS
• Mathematics
Journal of the Australian Mathematical Society
• 2015
We prove some new bounds for the size of the maximal dissociated subset of structured (having small sumset, large energy and so on) subsets of an abelian group.
Roth’s theorem in many variables
• Mathematics
• 2011
We prove that if A ⊆ {1, ..., N} has no nontrivial solution to the equation x1 + x2 + x3 + x4 + x5 = 5y, then $|A| \ll Ne^{ - c(\log N)^{1/7} }$, c > 0. In view of the well-known Behrend
On additive shifts of multiplicative subgroups
• Mathematics
• 2012
It is proved that for an arbitrary subgroup and any distinct nonzero elements we have under the condition that , where , are some sequences of positive numbers such that as . Furthermore, it is shown
We prove an elementary additive combinatorics inequality, which says that if $A$ is a subset of an Abelian group, which has, in some strong sense, large doubling, then the difference set A-A has a

## References

SHOWING 1-10 OF 31 REFERENCES
Freiman's theorem in an arbitrary abelian group
• Mathematics
• 2005
A famous result of Freiman describes the structure of finite sets A ⊆ ℤ with small doubling property. If |A + A| ⩽ K|A|, then A is contained within a multidimensional arithmetic progression of
Finite and infinite arithmetic progressions in sumsets
• Mathematics
• 2006
We prove that if A is a subset of at least cn1/2 elements of {1, . . . , n}, where c is a sufficiently large constant, then the collection of subset sums of A contains an arithmetic progression of
A new proof of Szemerédi's theorem
In 1927 van der Waerden published his celebrated theorem on arithmetic progressions, which states that if the positive integers are partitioned into finitely many classes, then at least one of these
Appendix to ‘Roth’s theorem on progressions revisited,’ by J. Bourgain
We show two results. First, a refinement of Freiman's theorem: if A is a finite set of integers and |A+A| > |A|(log |A|)^{4/3-\epsilon} for all \epsilon>0.
Finite field models in additive combinatories
The study of many problems in additive combinatorics, such as Szemer\'edi's theorem on arithmetic progressions, is made easier by first studying models for the problem in F_p^n for some fixed small
It is shown that there is a universal $\epsilon>0$ so that any subset of an abelian group with subtractive doubling $K$ must be polynomially related to a set with additive energy at least $\frac{1}{K^{1-\ep silon}}$.


text:
# Basics Guide to Smart Living and Home Automation

Posted by Access ME on

# BE SMART!! - CONTROL YOUR HOME FROM THE TOUCH OF A FINGER PRINT..

Are you Frustrated with wasting time on daily home routine tasks?! - This is an introduction to smart living and home automation, a guide to all that you need to learn, buy and automate...

This post comes in response to the hundreds of questions coming from our offline/online community, wondering about the new hype of Home Automation, and the "Era of Smart Living".

Throughout this post, we will shed more light on the 3 main basic things you need to know about how \to live smart - so let us dive right into it,

1. What does Home Automation mean and how does it work?!

Home Automation or  (also known as domotics[2]) is building automation for the home. It involves the control and automation of lighting, heating, cleaning (such as smart Robot Cleaner), ventilation, air conditioning (HVAC), and security, as well as home appliances such as washer / dryer, ovens, cookers or refrigerators/freezers.

Wi-Fi is often used for remote monitoring and control. Home devices, when remotely monitored and controlled via the Internet, are an important constituent of the Internet of Things. (Source: Wikipedia / https://en.wikipedia.org/wiki/Home_automation)

2. How easy is it to adapt and transition?!

Transitioning into a smart home owner is actually surprisingly easy, and let me tell you, it feels insanely good - it makes all the sense in the world. How much of a tech savvy person you need to be to live smart?, well as long as you can push buttons, give voice commands and/or use a simple smart mobile app, then you can hire cheap help to setup the simple connection/pairing or even better, you can test the capabilities of your 12 year old kid, while you sip coffee.

So If you have a couple of hundred dollars to spare every month (let's say 300-400 dollars, although somethings you can do for as little as $49.99), then you can be fully automated in 6 months. TO OUR MAILING LIST NOW AND GET OUR FREE SHOPPING GUIDE FOR THE HOTTEST MARKET TRENDS FOR 2017 3. What are the true benefits of having a Smart Home? The list is way too long that we really don't see how you don't already know or can imagine the benefits of living smart. But to humor your curiosity, think about smart living in the following scenarios: Here is a Case Study "Adam, is a hardworking man living with his wife Katie, and their 3 year old daughter Eva. Katie sells crafts online, and can easily monitor her baby napping with a smart wireless camera that has amazing night vision, voice/motion detection and 2 way-speech, whether she is working on her computer desk, cooking in the kitchen or tanning in the backyard, all for less than$100 - The family can enjoy its quite night sleep, as their $250 smart robot vacuum cleaner, they call Bob, auto-cleans their floors at a preset scheduled time in the middle of the night, every night. Now, while Katie is out on her girls night out over the weekend, Adam is gladly babysitting Eva. As Eva falls asleep in father's lap watching her favorite cartoon, he can close his curtains, turn on AC and dim down room light, all without having to get up and waking up the baby, using one mobile application included in the$70 smart home automation kit."

WATCH THIS VIDEO TO GET A GLIMPSE OF WHAT YOU CAN DO WITH A SMART HOME...

We hope this post was as light, entertaining and informative as we want it to be - for unique and interesting news, promotions and free smart living hacks, join our community and subscribe to our mailing list - we promise we do not spam.

Cheers, and remember to Choose to Live Smart


text:
## Illinois Journal of Mathematics

### Orbits of conditional expectations

#### Abstract

Let $N \subseteq M$ be von Neumann algebras and let $E:M\to N$ be a faithful normal conditional expectation. In this work it is shown that the similarity orbit ${\cal S}(E)$ of $E$ by the natural action of the invertible group of $G_M$ of $M$ has a natural complex analytic structure and that the map $G_M\to {\cal S}(E)$ given by this action is a smooth principal bundle. It is also shown that if $N$ is finite then ${\cal S}(E)$ admits a Reductive Structure. These results were previously known under the additional assumptions that the index is finite and $N'\cap M \subseteq N$. Conversely, if the orbit ${\cal S}(E)$ has a Homogeneous Reductive Structure for every expectation defined on $M$, then $M$ is finite. For every algebra $M$ and every expectation $E$, a covering space of the unitary orbit ${\cal U}(E)$ is constructed in terms of the connected component of $1$ in the normalizer of $E$. Moreover, this covering space is the universal covering in each of the following cases: (1) $\m$ is a finite factor and $\ind < \infty$; (2) $M$ is properly infinite and $E$ is any expectation; (3) $E$ is the conditional expectation onto the centralizer of a state. Therefore, in these cases, the fundamental group of ${\cal U}(E)$ can be characterized as the Weyl group of $E$.

#### Article information

Source
Illinois J. Math., Volume 45, Number 1 (2001), 243-263.

Dates
First available in Project Euclid: 13 November 2009

https://projecteuclid.org/euclid.ijm/1258138266

Digital Object Identifier
doi:10.1215/ijm/1258138266

Mathematical Reviews number (MathSciNet)
MR1849997

Zentralblatt MATH identifier
0991.46032

Subjects
Primary: 46L10: General theory of von Neumann algebras
Secondary: 46L30: States

#### Citation

Argerami, M.; Stojanoff, D. Orbits of conditional expectations. Illinois J. Math. 45 (2001), no. 1, 243--263. doi:10.1215/ijm/1258138266. https://projecteuclid.org/euclid.ijm/1258138266


text:
# Hypothesis testing

Institute for Environmental and Spatial Analysis...University of North Georgia

## 1   Null hypothesis

A default position that there is no significant relationship between two phenomena or among groups.

Often, denoted by $H_0$.

We never accept the null hypothesis. We only reject or fail to reject it given the level of confidence ($\alpha$-level).

## 2   Alternative hypothesis

A hypothesis that there is significant relationship between two phenomena or among groups.

Denoted by $H_a$.

## 3   What is the $\alpha$-level?

The $\alpha$-level or significance level indicates how extreme observed data must be before we can reject the null hypothesis.

## 4   A $p$-value?

The $p$-value is the probability that we observe a certain phenomenon under the null hypothesis.

## 5   Testing hypotheses

If the $p$-value is less than or equal to the $\alpha$-level, our data is unusual—more extreme than the significance level—and we reject the null hypothesis. We can say the data is statistically significant with a significance level of $\alpha$. In this case, the alternative hypothesis is supported, not accepted.

If the $p$-value is greater than the $\alpha$-level, the data is usual—not as extreme as the significance level—and we fail to reject the null hypothesis. We can say the data is statistically non-significant with a significance level of $\alpha$.

## 7   Homework: Testing a new chemical product

A manufacturer plans to introduce a brand new hand sanitizer into the consumer market during the COVID-19 pandemic. They must keep the concentration of hydrogen peroxide under its maximum allowed concentration of 3%. Since this product is new, they wanted to keep their standard higher and set the $\alpha$-level to 0.10, which is double the standard significance level of 0.05. They took 1,000 samples, measured the hydrogen peroxide concentration, and obtained a $p$-value of 0.08 based on their sample test. Please state the null and alternative hypotheses in your report and draw a conclusion. Can they sell this hand sanitizer?


text:
# Wavelet Regression in Python

## Wavelet Regression in Python¶

Last week I needed to get my head around wavelet regression techniques for a project I am working on. This post will show how to do basic wavelet regression in Python using PyWavelets. For references I used Chapter 9 in Wasserman's All of Non-Parametric Statistics, Ogden's Essential Wavelets for Statistical Applications and Data Analysis, and Donoho and Johnstone's "Ideal spational adaptation by wavelet shrinkage" [pdf]. I also recommend "An Introduction to Wavelets" [pdf] by Amara Graps for a high level overview and a brief historical treatment of the development of wavelet analysis. These references will provide much more detail and guidance than I will here.

Wavelets are mathematical functions that provide an orthonormal basis for functions in the $L^2$ space. The use of wavelets is akin to the use of sines and cosines to represent $L^2$ functions in Fourier analysis. In fact, many treatments on wavelets start the discussion by reviewing Fourier series represenations of functions. Legendre polynomials are another complete orthonormal system.

The simplest wavelet is the Haar wavelet. It is not much used in practice but it is convenient to fix ideas. The Haar function is given

$$\psi(x)=\begin{cases}1,&x \in [0,1)\cr -1,&x \in [\frac{1}{2},1)\cr 0,&\text{otherwise}\end{cases}$$

In [1]:
import pywt
import matplotlib.pyplot as plt
In [2]:
w = pywt.Wavelet('Haar')
phi, psi, x = w.wavefun(level=10)

fig, ax = plt.subplots()
ax.set_xlim(-.02,1.02)
ax.plot(x, psi);

The location in the domain and the range of this mother wavelet function can be conrolled by a translation index $k$ and a dilation index $j$, respectively.

$$\psi_{j,k}(x)=2^{j/2}\psi(2^{j}x-k)$$

A wavelet system is fully defined once a scaling function, or father wavelet, is defined. The scaling function ensures that the orthonormal basis covers the original space of a function without having to use an infinite number of mother wavelets. The father wavelet for the Haar system is

$$\phi(x)=I_{[0,1)}(x)$$

where $I_A(x)$ is an indicator function that equals 1 if $x$ is in the set $A$. You can see that any dilation and translation can cover the original function space. While the Haar function is a good introduction, the rest of the code will use the most nearly symmetric Debauchies wavelet with N=8.

In [3]:
db8 = pywt.Wavelet('db8')
scaling, wavelet, x = db8.wavefun()

fig, axes = plt.subplots(1, 2, sharey=True, figsize=(8,6))
ax1, ax2 = axes

ax1.plot(x, scaling);
ax1.set_title('Scaling function, N=8');
ax1.set_ylim(-1.2, 1.2);

ax2.set_title('Wavelet, N=8');
ax2.tick_params(labelleft=False);
ax2.plot(x-x.mean(), wavelet);

fig.tight_layout()

For the current purposes, the objective of wavelet analysis is to recover the unknown function $f$ from noisy data

$$y_i = f(x_i) + e_i, i \in \left\{1,\dots,n\right\}$$

with $x_i = i/n$ without loss of generality and $e_i \sim N(0,\sigma^2)$. The expansion of the function $f$ as a finite sum of wavelets can be achieved as

$$f_J(x) = \alpha\phi(x) + \sum_{j=0}^{J-1}\sum_{k=0}^{2^j-1}\beta_{jk}\psi_{jk}(x)$$

where

$$\alpha=\int_0^1f(x)\phi(x)dx\text{, }\beta_{jk}=\int_0^1f(x)\psi_{jk}(x)dx.$$

$\alpha$ and $\beta_jk$ are called the scaling coefficients and the detail coefficients, respectively. The basic idea is that the detail coefficients capture the coarser details of the function while the scaling, or smoothing, coefficients capture the overall functional form.

Donoho and Johnstone use four functions that mimic properties of empirical data in domains where wavelets might be useful, Bumps, Blocks, HeaviSine, and Doppler. For completeness, they are defined here.

In [4]:
def doppler(x):
"""
Parameters
----------
x : array-like
Domain of x is in (0,1]

"""
if not np.all((x >= 0) & (x <= 1)):
raise ValueError("Domain of doppler is x in (0,1]")
return np.sqrt(x*(1-x))*np.sin((2.1*np.pi)/(x+.05))

def blocks(x):
"""
Piecewise constant function with jumps at t.

Constant scaler is not present in Donoho and Johnstone.
"""
K = lambda x : (1 + np.sign(x))/2.
t = np.array([[.1, .13, .15, .23, .25, .4, .44, .65, .76, .78, .81]]).T
h = np.array([[4, -5, 3, -4, 5, -4.2, 2.1, 4.3, -3.1, 2.1, -4.2]]).T
return 3.655606 * np.sum(h*K(x-t), axis=0)

def bumps(x):
"""
A sum of bumps with locations t at the same places as jumps in blocks.
The heights h and widths s vary and the individual bumps are of the
form K(t) = 1/(1+|x|)**4
"""
K = lambda x : (1. + np.abs(x)) ** -4.
t = np.array([[.1, .13, .15, .23, .25, .4, .44, .65, .76, .78, .81]]).T
h = np.array([[4, 5, 3, 4, 5, 4.2, 2.1, 4.3, 3.1, 2.1, 4.2]]).T
w = np.array([[.005, .005, .006, .01, .01, .03, .01, .01, .005, .008, .005]]).T
return np.sum(h*K((x-t)/w), axis=0)

def heavisine(x):
"""
Sinusoid of period 1 with two jumps at t = .3 and .72
"""
return 4 * np.sin(4*np.pi*x) - np.sign(x - .3) - np.sign(.72 - x)
In [5]:
x = np.linspace(0,1,2**11)
dop = doppler(x)
blk = blocks(x)
bmp = bumps(x)
hsin = heavisine(x)
In [6]:
fig, axes = plt.subplots(2, 2, figsize=(10,10))
ax1 = axes[0,0]
ax2 = axes[0,1]
ax3 = axes[1,0]
ax4 = axes[1,1]

ax1.plot(x,dop)
ax1.set_title("Doppler")

ax2.plot(x,blk)
ax2.set_title("Blocks")

ax3.plot(x,bmp)
ax3.set_title("Bumps")

ax4.set_title("HeaviSine")
ax4.plot(x,hsin)

for ax in fig.axes:
ax.tick_params(labelbottom=False, labelleft=False, bottom=False,
top=False, left=False, right=False)

fig.tight_layout();

The wavelet coefficients fully describe some data. First, generate some data from the noisy doppler function and apply a discrete wavelet transform to recover the smoothing and detail coefficients, then have a look at a common diagnostic plot of the wavelet coefficients using coef_pyramid_plot.

In [7]:
def coef_pyramid_plot(coefs, first=0, scale='uniform', ax=None):
"""
Parameters
----------
coefs : array-like
Wavelet Coefficients. Expects an iterable in order Cdn, Cdn-1, ...,
Cd1, Cd0.
first : int, optional
The first level to plot.
scale : str {'uniform', 'level'}, optional
Scale the coefficients using the same scale or independently by
level.
ax : Axes, optional
Matplotlib Axes instance

Returns
-------
Figure : Matplotlib figure instance
Either the parent figure of ax or a new pyplot.Figure instance if
ax is None.
"""

if ax is None:
import matplotlib.pyplot as plt
fig = plt.figure()
ax = fig.add_subplot(111, axisbg='lightgrey')
else:
fig = ax.figure

n_levels = len(coefs)
n = 2**(n_levels - 1) # assumes periodic

if scale == 'uniform':
biggest = [np.max(np.abs(np.hstack(coefs)))] * n_levels
else:
# multiply by 2 so the highest bars only take up .5
biggest = [np.max(np.abs(i))*2 for i in coefs]

for i in range(first,n_levels):
x = np.linspace(2**(n_levels - 2 - i), n - 2**(n_levels - 2 - i), 2**i)
ymin = n_levels - i - 1 + first
yheight = coefs[i]/biggest[i]
ymax = yheight + ymin
ax.vlines(x, ymin, ymax, linewidth=1.1)

ax.set_xlim(0,n)
ax.set_ylim(first - 1, n_levels)
ax.yaxis.set_ticks(np.arange(n_levels-1,first-1,-1))
ax.yaxis.set_ticklabels(np.arange(first,n_levels))
ax.tick_params(top=False, right=False, direction='out', pad=6)
ax.set_ylabel("Levels", fontsize=14)
ax.grid(True, alpha=.85, color='white', axis='y', linestyle='-')
ax.set_title('Wavelet Detail Coefficients', fontsize=16,
position=(.5,1.05))
fig.subplots_adjust(top=.89)

return fig

Generate the data and get the coefficients using the multilevel discrete wavelet transform. Plot the true coefficients and the noisy ones.

In [8]:
from scipy import stats
import numpy as np

np.random.seed(12345)
blck = blocks(np.linspace(0,1,2**11))
nblck = blck + stats.norm().rvs(2**11)

true_coefs = pywt.wavedec(blck, 'db8', level=11, mode='per')
noisy_coefs = pywt.wavedec(nblck, 'db8', level=11, mode='per')

fig, axes = plt.subplots(2, 1, figsize=(9,14), sharex=True)

fig = coef_pyramid_plot(true_coefs[1:], ax=axes[0]) # omit smoothing coefs
axes[0].set_title("True Wavelet Detail Coefficients");

fig = coef_pyramid_plot(noisy_coefs[1:], ax=axes[1]) ;
axes[1].set_title("Noisy Wavelet Detail Coefficients");

fig.tight_layout()

Notice that most of the coefficients of the true signal are zero. This is the idea of sparseness, most functions, smooth or otherwise, have a sparse respresentation in a wavelet basis. The detail coefficients are non-zero where the block function is not flat. The detail coefficients of the noisy signal have many more non-zero coefficients at the higher resolutions from the added noise. To recover the signal from the noisy coefficients, you threshold the coefficients. Essentially, thresholding sets many of the coefficients to zero by assuming that they are noise. There are a number of ways to go about performing thresholding. Details can be found in the given references. I will simply apply soft thresholding using the universal threshold. The universal threshold is defined

$$\lambda=\hat{\sigma}\sqrt{2\log(N)}$$

where $\hat{\sigma}$ is a robust estimator of the standard deviation of the finest level detail coefficients. Here, I use the standardized median absolute deviation available from statsmodels.

$$\hat{\sigma}=\text{M}\text{A}\text{D}(\beta_{J-1,\cdot})$$

In [9]:
from statsmodels.robust import stand_mad

sigma = stand_mad(noisy_coefs[-1])
uthresh = sigma*np.sqrt(2*np.log(len(nblck)))

denoised = noisy_coefs[:]

denoised[1:] = (pywt.thresholding.soft(i, value=uthresh) for i in denoised[1:])

We can recover the signal by applying the inverse discrete wavelet transform to the thresholded coefficients.

In [10]:
signal = pywt.waverec(denoised, 'db8', mode='per')

fig, axes = plt.subplots(1, 2, sharey=True, sharex=True,
figsize=(10,8))
ax1, ax2 = axes

ax1.plot(signal)
ax1.set_xlim(0,2**10)
ax1.set_title("Recovered Signal")
ax1.margins(.1)

ax2.plot(nblck)
ax2.set_title("Noisy Signal")

for ax in fig.axes:
ax.tick_params(labelbottom=False, top=False, bottom=False, left=False,
right=False)

fig.tight_layout()

PyWavelets is a really cool project. But it could use a little more attention. It would be nice if some of the library functions were wrapped up so that they return wavelet objects that would be easier to work with. For instance, if wavedec returned a discrete wavelet object that the thresholding functions also accepted, this would save me some keystrokes in the above. I do not have time to take on another project, but it is low hanging fruit if someone else does. The code is MIT licensed and might even find a nice home in SciPy.


text:
Open in CoCalc
matrix([[1/8]*8]*8)

[1/8 1/8 1/8 1/8 1/8 1/8 1/8 1/8] [1/8 1/8 1/8 1/8 1/8 1/8 1/8 1/8] [1/8 1/8 1/8 1/8 1/8 1/8 1/8 1/8] [1/8 1/8 1/8 1/8 1/8 1/8 1/8 1/8] [1/8 1/8 1/8 1/8 1/8 1/8 1/8 1/8] [1/8 1/8 1/8 1/8 1/8 1/8 1/8 1/8] [1/8 1/8 1/8 1/8 1/8 1/8 1/8 1/8] [1/8 1/8 1/8 1/8 1/8 1/8 1/8 1/8]


text:
Last edited 11/09/2019

Very confused because this is an internal scan, does this indicate boy or girl? Obviously it’s not a science but it was right for my 2nd so curious

1

Be the first to comment!


text:
## Sunday, September 24, 2006

Everyone has heard of "Moore's Law", which asserts that CPUs double in roughly every 18 months. Similar phenomena are at work with memory, flash memory, disks, etc. I recently bought a pair of 400G USB disks for Rs.9,000 each - that's Rs.22.5 per G or $0.5 per G. I'm sure that some years from now, this blog entry will look incredibly dated, when hard disk capacity goes at Rs.2.25 per G! I vividly remember how roughly 12 years ago, when I was at CMIE, early design work for terabyte storage was being done and it looked most daunting. Now a terabyte is just 3 disks of Rs.9,000 each. The growth of performance of a single-CPU has not kept up with Moore's law. But two things have taken place in spectacular measure. First, holding an old level of performance fixed, the cost of a CPU which achieves that level of performance has been crashing nicely. It's easy to put a decent 32-bit CPU into just about any low-price device today. The second phenomenon has been parallel computation. The name of the game now seems to be about harnessing a large number of CPUs to get your work done. For a large class of problems, that appears to be feasible. Commercial software prices - like Oracle or Microsoft Windows - have held up remarkably well in real terms. So if one tries to configure a system today, the stable software costs loom large when compared with crashing hardware costs. But free software is creeping up into a larger and larger class of problems. It's possible to build a very powerful data centre with Linux, Apache, MySQL, and a free J2EE implementation. Such a data centre would be able to deliver transactions at mere hardware cost. ### Crashing prices of IT systems make interesting things possible Backing up your audio CDs. The `flac' file format permits lossless compression of audio CDs. So when you buy a CD, you can rip the .wav files and convert them to .flac files. As a thumb-rule, one audio CD reduces to 250 Meg or 0.25 G of .flac files. When storage costs Rs.22.5 per G, this means that for a price of Rs.8 of hard disk space, you get to keep a backup of your audio CD. When your audio CD gets scratched or broken, you would uncompress the .flac files to get back to the .wav files which can be burned into an audio CD. Imagine that. The biggest data centre in the world, through ad revenues. A few years ago, if someone had asked me whether it was possible run a million-CPU data centre supported only by advertising, I would have said that it's not possible to run a million-CPU data centre. But today, we know that Google is extremely profitable running the most complex data centre in the world, and practically all their revenues are from advertising. Other small data centres based on ad revenues? Turning to the territory more familiar to the readers of this blog, think of a brokerage firm. A brokerage firm is basically a data center interfacing between customer and exchange. If done right, using free software, it ought to be possible to do this data centre at hardware cost. If so, the cost per transaction of the brokerage firm ought to drop dramatically (see my earlier post on flat-price transactions in the brokerage industry). At some point, it'd become possible to have a brokerage firm which offers free transactions, supported only by advertising. It isn't obvious that it works, but it's worth trying. The first attempt at doing this has begun: link, link, link. Free wifi in a city. When prices of IT hardware are sufficiently low, it may be possible to have free wifi in a city. I am sure that it is possible to have free wifi within a city for low bandwidth applications like email or reading the web. I don't know how the cost of infrastructure will go up if everyone is swapping videos using bit torrent. What might happen is that when city-wide networks are built, the video-related traffic will become so great that the network becomes effectively unusable, that some kind of congestion-pricing is central to making it work correctly. This might be the case; I don't know whether this is just an unhappy scenario or a likely outcome. Easing nation-building in poor countries. I have previously written about the role of IT systems in delivering national public goods in India [link to paper]. The uniquely Indian challenge is : high volume + low transaction size. Being able to pull this off critically relies on building IT systems which deliver very low cost per transaction. A key litmus test shaping up of these questions is on the implementation of the New Pension System [link to paper]. ### Indian broadband prices are out of line In this happy environment of dropping prices of hardware and software, prices of broadband in India stick out. By now, mobile telephony in India has acceptable prices by world standards. But broadband is still way out of line. A recent blog entry says that the price of a megabit connection per month in the US has dropped to$6 (Rs.300). He quotes "Harvey's theorem": Divide your monthly bill by the speed being touted by your broadband provider" as the path to these calculations. In an Indian setting, that would be between Rs.1,000 and Rs.2,000 a month for a 512k connection from MTNL? That's between 2000-4000 INR (or $25 to$50) per megabit per month. This is between 5x to 10x costlier than in the US. I don't understand why this has to be.

China has 123 million Internet users, of which 77 million are broadband subscribers. A corresponding Indian number seems to be 25 million; broadband usage in India is as yet pitiful. I'm sure both numbers are artificially inflated - perhaps both numbers are wrong by an equal magnitude? I wonder how much of this is caused by lower Indian per capita GDP, and how much of this is caused by high prices of broadband in India.

Please note: LaTeX mathematics works. This means that if you want to say $10 you have to say \$10.


text:
cofactor matrix in Hill cipher

And there it says that the value of K is the following:

$$K= \begin{pmatrix} 11&8\\3&7 \end{pmatrix}$$

Now I need to calculate $K^{-1}$, so for that reason I calculate the adjoint matrix by using the cofactors. For what I know it should be:

\begin{pmatrix} 7&-3\\-8&11 \end{pmatrix}

but in the slides it appears that is:

\begin{pmatrix} 7&-8\\-3&11 \end{pmatrix}

which is different from the one I calculate, what am I doing wrong?

Over any (commutative unitary) ring $R$, the inverse of $$E=\begin{bmatrix} a&b\\c&d\end{bmatrix}, a,b,c,d \in R$$ (if it exists), can be found by first computing the determinant $f:=ad-bc$. The inverse exists iff $D$ is an invertible element in $R$, so iff $\exists f' \in R$ with $ff'=1$. Then
$$E^{-1} = \begin{bmatrix} df'&-bf'\\ -cf'& af' \end{bmatrix}$$ as a direct computation verifies.
In your case the determinant is $7\cdot 11 -3\cdot 8 = 53 = 1 \pmod{26}$ (and so in $R= \mathbb{Z}_{26}$ we have $f = f' = 1$ in the above formula).


text:
# How to get Geometry nodes modifier inputs and its type using python

Is there any way to get the input value and type of Geometry Nodes modifier I want to use these values in an addon, but these are not consistent, so I can't call it by using this command as sometimes it can be Input_3 despite its second input only

bpy.ops.object.geometry_nodes_input_attribute_toggle(prop_path="[\"Input_2_use_attribute\"]", modifier_name="GeometryNodes")

and I can't feed the values using this -

bpy.data.objects["Cube"].modifiers["GeometryNodes"]["Input_2_attribute_name"] = "UVMap"

as this will only work if the inputs are toggled to attribute only.

so is there any way to get the status of the input? and can we get all the inputs of a modifier and the input name and use Input name to make sure, we are feeding values for the right input, Like in the below example image second input's name is UVMap and I want to feed some value to the input of the modifier which has this particular name only and not by the name like Input_2

or is there any other better way of handling this situation?

Edit:

I have some doubts, like we need to use this command to toggle to attribute mode, and is there any other way of toggling? or is it the only way? bpy.ops.object.geometry_nodes_input_attribute_toggle(prop_path="[\"Input_2_use_attribute\"]", modifier_name="GeometryNodes") as this method use "Inputs_2_use attribute" as string and we can't assign this value to variable and use it dynamically.

• FWIW the operator can be overriden with the object key if you don't want to use the context : bpy.ops.object.geometry_nodes_input_attribute_toggle({"object": bpy.data.objects["Cube"]}, prop_path="[\"Input_2_use_attribute\"]", modifier_name="my_mod_name") Feb 13 at 20:30

## 1 Answer

Be aware that there is current a bug in Geometry Nodes and the assignment will not always work correctly.

That said, the way to get to the individual input fields is to go through the object's Geometry Node Modifier's node_group to get the relationship between the display name of the input field and the numeric position of the input field. Here's an example that assumes that modifier has already been set to the object's Geometry Nodes Modifier:

for input in modifier.node_group.inputs:
print(f"Input {input.identifier} is named {input.name}")

Thus, if you know the name, you would search node_group.inputs for that name. That input would be the one you wanted.

Also note that the modifier's own name "GeometryNodes" can change and that an object can have more than one GeometryNodes modifier. Here's code that finds all of the GeometryNode modifiers of the active object and selects the first one in the list:

object = bpy.context.active_object

modifiers = []
for modifier in object.modifiers:
if modifier.type == 'NODES':
modifiers.append(modifier)
print(f"Found Geometry Node modifier {modifier.name}")

modifier = modifiers[0]

• Hi, thanks for your answer, and it helped me pretty much, but still I have some doubts, like we need to use this command to toggle to attribute mode, and is there any other way of toggling? or is it the only way? bpy.ops.object.geometry_nodes_input_attribute_toggle(prop_path="[\"Input_2_use_attribute\"]", modifier_name="GeometryNodes") as this method use "Inputs_2_use attribute" as string and we can assign this value to variable and use it dynamically. I hope you understood though this may be a little bit of unclear explanation Dec 20, 2021 at 17:48
• We do have to use the toggle and as far as I know there is no other way. Dec 28, 2021 at 14:48