Group Abstract Group Abstract

Message Boards Message Boards

1
|
2.8K Views
|
4 Replies
|
6 Total Likes
View groups...
Share
Share this post:

Difficulty with Blend: how to Blend a Color with a Table of Colors?

Hello,

I'm brand new to Wolfram, and I'm struggling on one of the practice problems in the tutorial. Problem 7.7 asks : "Make a list of colors obtained by blending yellow with hues from 0 to 1 in steps of 0.05."

This seems very simple, but everything I try seems to fail:

If someone could tell me what I am doing wrong, it would be greatly appreciated!

POSTED BY: Orion Strayer
4 Replies
Posted 2 years ago
POSTED BY: Phil Earnhardt
Posted 2 years ago

Hi Phil,

You are welcome.

Table is just semantic sugar -- a "macro" in other programming languages. Blend doesn't really exist, either.

Actually, it is not semantic sugar and they both do exist as functions (pattern -> replacement). The reason they do not appear in the FullForm is that its argument has been evaluated before passing it to FullForm. It does not hold its arguments

Attributes@FullForm
(* {Protected} *)

So it is the FullForm of the evaluated expression.

1 + 1 // FullForm
(* 2 *)

1 + 1 // Hold // FullForm
(* Hold[Plus[1, 1]] *)

At its core, the WL is a term rewriting system. Watch the 3 video presentations by Professor Richard J. Gaylord for an overview of how WL uses term rewriting. This is also worth a read.

POSTED BY: Rohit Namjoshi
Posted 2 years ago
POSTED BY: Phil Earnhardt
Posted 2 years ago

Hi Orion,

You were close with Attempt 3, just misplaced parenthesis

Table[Blend[{Yellow, Hue[x]}], {x, 0, 1, 0.05}]
POSTED BY: Rohit Namjoshi
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard