Jump to content
WnSoft Forums

Recommended Posts

Posted

Here's a challenge for all of you who are trying to get to grips with Cubes and Pyramids etc in PTE.

The great Pyramid on the Giza Plateau was constructed very precisely by the ancient Egyptians:

Its base is a (~) perfect square and the angle of each side (for the purposes of this excercise) can be assumed to be 52.9573 degrees to the horizontal. The Geometric Centre of a Pyramid is a quarter way up from the base to the apex.

The Challenge is to construct a Pyramid in PTE on an 800x800 pixel base to the same proportions as the Great Pyramid in Giza and then have it rotate in all directions about its Geometric Centre.

The main dimensions which will have to be calculated precisely are the height of the Pyramid (in pixels) from its base to its apex and the height of each of the Triangular PNG files used to make each of the four faces.

The height in pixels from the base to the apex will be required to calculate the Geometric Centre of the object.

Post Templates here.

DG

Posted

Hi Dave,

I won't say 'Thanks!' for the challenge!

I'm struggling!

My basic maths was up to creating the isosceles triangles for the faces, with base angles of (530) on a base line of 800 pix. I did that in Photoshop. I could construct the pyramid in PtoE to turn in all directions but what I'm finding difficult (impossible!) is working out how to 'nest' the frames for faces and base in order to find the virtual centre of the pyramid and place the rotation points at the right place. Now someone will probably tell me this is not even be the right way of approaching it!

I can see how I'm going to be spending the rest of the day!!

Sheila G

Posted

Hi All,

Need advice! Am I on the right lines?

I've put my control frame for the pyramid inside a master frame in which I've made the centre of rotation about 3 quarters of the way down from the top. This had the effect of making the pyramid have its base just below the bottom of the screen. I then 'lifted' the whole lot to place the pyramid in the centre of the screen. When rotating through 3600, in all directions, it doesn't seem to shift from the centre, nor does the perspective appear to change. Unfortunately, it's all done by trial and error and I haven't got any maths to back it up or see how far out I am!

It's a bit (a lot!) untidy at the moment but I shall keep trying.

Sheila G

Posted

If I understand what you have said Sheila, you have made an error in where to put the 52.9573 degree angle.

It is not the angle used to construct each face.

The 52.9573 is the angle that each face makes when tilted toward the apex and viewed at 90 degrees.

This site:

http://www.carbidede...s-trigright.asp

...might be of help to you. Think of what you know already i.e. the angle and the base dimension.

It is imortant to use the angle I gave you EXACTLY and then round off your vertical height and face height to the nearest pixel. Beware of inaccuracies in Photoshop when making your sides. You might have to zoom in to 3200% to ensure accuracy.

Don't worry about "nested frames" at this stage - I think that you will only need one frame to do the construction. The rotational frame(s) can be added later.

DG

Posted

Hi,

***** !!!

I've just had a lesson, from my husband, in working out the correct shape of each face! I should have asked him before I started! Back to the drawing board!

Thanks for putting me right,

Sheila G

Posted

I've built the basic pyramid shape using rectangular sides; and so I know I've got my maths right for the slope height and the internal slope angle. But now I've hit a "technology brick wall" and I'd welcome a point in the right direction: how does one create a precise triangle shape in Photoshop (Elements for preference)?

I've tried using the Polygonal Lasso to select from the rectangular sides but cannot get a precise enough fit into the corner and onto the edges to be certain of getting all the pixels. I know that if I could get the triangles produced I will need only to substitute those images for the existing rectangles. My PTE skills are fine; it's my Photoshop skills that are letting me down.

Peter

Posted

Hi Peter,

I know exactly what you mean and I refered to the "problem" in an earlier post.

I turned all "SNAP" controls OFF and made sure that the rulers are set to PIXELS rather than percentage. I also worked at 3200%.

I'll have a word with one of my Photoshop gurus later in the week on Club Night.

DG

Posted

Hi Peter,

Constructing the triangle in Photoshop........... All lines drawn on separate, transparent layers. The angles can be constructed by drawing a perfectly horizontal line (holding down shift), of a longer than necessary length, then rotating it through the required angle using edit/transform/rotate. In the top bar you'll find that you can set the desired angle. Once you've done this you can move it into position and chop off any length you don't need. make sure that you're zoomed in to a high magnification and set the preferences for pixels for greater accuracy. When the triangle is completed, zoom in really closely and select the sides. On a new, empty layer, fill the selection with a colour. Hide the background layer and then Image/trim/transparent pixels for a clean .png. Keep the selection active and on 3 more layers make your other sides. Hope this helps. I don't use Elements so don't know what that offers.

All.........

This is as far as I can get!

For some reason the Dropbox url won't resolve but, as soon as I can get into it, I'll upload a zipped project file which is constructed from triangular faces that slope towards the apex at an angle of 530 (couldn't get any closer than that!) the angles of the triangle faces, themselves, are: base angles 590 and third angle 620 (as close as I can get. Perhaps they should all have been 600? Anyway, it seems to fit together pretty cleanly.

Thanks for the link to the maths pages, Dave. However, the only thing I understood were the diagrams! the issue of the geometric centre is completely beyond me! I've moved the rotation point of the master frame .............. does that help?

No doubt someone will solve the problem in a matter of minutes!

Regards to all,

Sheila G

Posted

Hi,

No sooner had I posted than the Dropbox url resolved!

Here is the link to the project I referred to above.....

Pyramid Giza Challenge link

Regards,

Sheila G

Posted

Before I look at those here's a thought about drawing a triangle.

If the angle that you are trying to draw is anything OTHER than 45 dgrees you are going to get into difficulties because the pixel nature of a photoshop canvas means that your angle is going to be a STEPPED line.

If you start with a 2:1 canvas then the angle will be a perfect 45 degrees. Photoshop can cope with that.

Then, by making your PNG in that format it can be resized to any height you require using Image Size and adjusting height only.

DG

Posted

Sheila,

You're almost there. I had to do the last bit by trial and error as far as values were concerned. Try proceeding from what you've uploaded as follows:

Return Frame2 to lie flush with Frame1. Turn Frame 1 through about 85-86 degrees around the Y-axis. Re-select Frame2 and use the little arrow buttons of Pan Z in order to push the pyramid through Frame1 into the picture. What you are looking for is how much pan Z is needed to get the apex of the pyramid just touching the plane of Frame1. You'll probably need to keep giving Frame1 the full 90 treatment to check how close you are. Once you are there, you need just one quarter of the pan Z value to position Frame2 so that it sits with its geometric centre on the plane of Frame1.

Now just re-apply your original rotate back onto Frame2 - and that should be it!

regards,

Peter

Posted

Dave,

Thanks for this challenge, it's been great fun to do a Great Pyramid! I've re-learned trigonometry that I hadn't used since sixth form (almost 45 years ago). But, it has to be said, doing it with Excel spreadsheets was a lot easier than looking values up in sine/cosine/tangent tables. And I've also learned how to use rulers set to pixels to help me get accurate placement of selections in Photoshop. All in all, a pleasant and instructive way to spend a wet bank Holiday Sunday afternoon.

Once again, thanks for the idea.

regards,

Peter

P.S. I think, in Sheila, we've discovered a kindred spirit!

Posted

Peter,

Closely examine the differences between your two controlling frames and the 800x800 base and mine?

You will notice that I haven't had to use a PAN Z setting.

DG

Posted

Hi Sheila,

Where did you get the "daemonic" 666 figure from?

Peter and I agree on 664.

If you turn your zoom percentage up to 500% in O&A you can see the inaccuracy in the apex of the pyramid between the first two keypoints.

Also I can't see that your pyramid revolves around the Geometric Centre of the object?

You have used 53 degrees as opposed to 52.9573. That figure is very important and can be inputted manually.

If you use 664 and 52.9573 it all comes together perfectly at a point 530 above the base.

Take a look at my Template?

DG

Posted

Dave,

I build them the way that I think about them - and no doubt you do too! When doing Rubik's Cube with v6.0 I asked Igor if a non-visible object imposed any processing overhead. He replied that there was no overhead as far as the load on the graphics card was concerned. Ever since I have used frames plentifully; I find they help me to compartmentalize my thinking and my building of the animation. Each to their own.

Now, all we have to do is get Sheila across the finish line, too.

regards,

Peter

Posted

Hi Peter and Dave,

I'm suitably (and very) impressed by your project files!

If I'd known this morning what I should be aiming to create, I wouldn't have even started!

I like a challenge but I think I've got to accept my limits and stick with playing around!

Dave.........

The 'discrepancies' would probably have crept in when I created the .pngs for the faces in Photoshop. Obviously I wasn't as careful as I should have been. I used a 2 pixel pencil line which would probably have accounted for them. I still don't understand how the extra control with the transparent .png works (and I can probably still live without that knowledge!) and never in a million years would I have worked it out!

Peter,

I like being a kindred spirit!! I don't know about a finishing line, though. I shall follow your instructions and try to find the geometric centre of my pyramid although I still find difficulty in visualising 'why' it works.

Ah well, it kept me busy all day.

Regards,

Sheila G

Posted

Hi Peter,

The reason I mentioned the PAN Z control is as follows:

IN THIS INSTANCE (and taking your method specifically) your PAN Z setting is 33% of SOMETHING which ultimately represents 132.5 Pixels - a quarter of the height of the object.

33% suggests a third, but if you say it's 135 Pixels I accept that. If it is a THIRD of SOMETHING shouldn't it be 33.3333333333% for greater accuracy?

The other way of tackling it, as I have done, is to use a frame which is twice the widthof the desired movement (PAN). By adding the BASE to that turning it by 90 degrees the PAN Control in O&A can be used to move the BASE by (EXACTLY) 100%.

In this relationship, moving an object by 100% means moving it HALF of the width of the Parent i.e. (EXACTLY) 132.5 Pixels.

I started this thread in an attempt to UNDERSTAND PAN Z - I must admit to be still struggling. I know the EFFECT of PAN Z - I just struggle with the Maths of it.

However, I can understand the concept of 100% pan in O&A being equal to 50% of the width of the parent much easier. I also think that carefully choosing the PIXEL size of a PARENT frame is very important to getting accurate results.

I will leave PAN Z to the business of getting an EFFECT rather than getting accurate placement until I understand a little more.

Can you offer a mathematical explanation of PAN Z?

DG

Posted

Sheila,

It MIGHT(?) be possible to correct your "discrepancies" by taking your triangles back into Photoshop and resizing to 800x664.

If you then adjust all of the angles to 52.9573 degrees you SHOULD be there?

DG

Posted

Can you offer a mathematical explanation of PAN Z?

Dave,

No, I'm afraid not. Like you, I understand its effect; but that's all. I suggest you PM or e-mail Igor and ask him to post some technical details here for everyone's benefit. When I did my empirical investigations (wth v6.0 betas) they seemed to show that the result of 100 of Pan Z was different at different object sizes and at different O&A Zoom settings of those objects. I never did try to get to the bottom of it because all I wanted was the right effect.

And on the subject of accuracy: since our monitors (and projectors) cannot handle anything smaller than a whole pixel, just how precise do we have to be? Do we always need three decimal places of accuracy? I'm a firm believer in the creed "near enough is good enough". To me, if the position is looking right on screen then that is all I require. It doesn't have to be mathematically perfect.

regards,

Peter

Posted

It doesn't have to be mathematically perfect.

Hi Peter,

I have to disagree - if the object that you are making is interacting with another object then the inaccuracies introduced by approximation are/can be AMPLIFIED.

A discrepancy which does not show on a 1024x768 monitor might be horrible on a 2560 wide monitor (or vice versa)?

I think that my point would be: It's OK to compromise/approximate when you are doing it yourself for your own use, but if you are making your efforts public or TEACHING then you have to be exact.

Thanks for participating, it's been interesting,

DG

Guest
This topic is now closed to further replies.
×
×
  • Create New...